input: Write a function to merge two dictionaries.
  assert merge_dictionaries({'a': 1, 'b': 2}, {'c': 3, 'd': 4}) == {'a': 1, 'b': 2, 'c': 3, 'd': 4}
  assert merge_dictionaries({'x': 10, 'y': 20}, {'y': 30, 'z': 40}) == {'x': 10, 'y': 30, 'z': 40}
  assert merge_dictionaries({}, {'key': 'value'}) == {'key': 'value'}
output: def merge_dictionaries(dict1, dict2):
      result = dict1.copy()
      result.update(dict2)
      return result