-----Description-----
Given an input string "words_str", this task requires writing a Lean 4 function that reverses the order of its words. A word is defined as a contiguous sequence of non-space characters. The function must remove any extra spaces so that the output string contains words separated by a single space and has no leading or trailing spaces. The characters within each word must stay the same as the original input.

-----Input-----
words_str: A string that may contain leading, trailing, or multiple spaces between words.

-----Output-----
A string with the words from the input reversed, where words are separated by a single space, with no extra spaces at the beginning or end.

