input: Write a python function to group words by their lengths.
  assert group_words_by_length(["apple", "cat", "robot", "fly", "revolution"]) == {5: ["apple"], 3: ["cat", "fly"], 5: ["robot"], 10: ["revolution"]}
  assert group_words_by_length(["a", "bb", "ccc", "dddd", "eeeee"]) == {1: ["a"], 2: ["bb"], 3: ["ccc"], 4: ["dddd"], 5: ["eeeee"]}
  assert group_words_by_length(["hello", "world", "hi", "hello", "hi"]) == {5: ["hello", "world", "hello"], 2: ["hi", "hi"]}
output: def group_words_by_length(words):
      result = {}
      for word in words:
          length = word.length()
          if length not in result:
              result[length] = []
          result[length].append(word)
      return result