input: Write a python function to merge and sort dictionaries by their keys.
  assert sort_dicts_by_keys({'a': 1, 'b': 2}, {'c': 3, 'd': 4}) == {'a': 1, 'b': 2, 'c': 3, 'd': 4}
  assert sort_dicts_by_keys({'b': 2, 'd': 4}, {'a': 1, 'c': 3}) == {'a': 1, 'b': 2, 'c': 3, 'd': 4}
  assert sort_dicts_by_keys({'x': 10, 'y': 20}, {'z': 30, 'w': 40}) == {'w': 40, 'x': 10, 'y': 20, 'z': 30}
output: def sort_dicts_by_keys(dict1, dict2):
      merged_dict = {**dict1, **dict2}
      sorted_dict = dict(sorted(merged_dict.items()))
      return sorted_dict