input: Write a python function to replace double spaces with a single space and strip any leading or trailing spaces from a given string.
  assert replace_double_spaces("the Cat  in the hat  ") == "the Cat in the hat"
  assert replace_double_spaces("  Hello  World  ") == "Hello World"
  assert replace_double_spaces("Python   Programming  ") == "Python Programming"
output: def replace_double_spaces(input_str):
      return ' '.join(input_str.split())