Leidos systems may receive report text with inconsistent spacing before presenting it to an operator. Given a string, return the words in reverse order without reversing the characters inside any word.
Treat any sequence of spaces as a separator. The result must contain exactly one space between adjacent words and no leading or trailing spaces. If the input contains no words, return an empty string.
Implement reverse_words(text), where text is a string and the return value is a string. A word is a maximal sequence of non-space characters. The relative character order within each word must remain unchanged, while the order of the words must be reversed.
def reverse_words(text):