input: Write a python function to remove an element from a dictionary given a key.
  assert remove_dict_element({'a': 1, 'b': 2, 'c': 3}, 'b') == {'a': 1, 'c': 3}
  assert remove_dict_element({'x': 10, 'y': 20, 'z': 30}, 'y') == {'x': 10, 'z': 30}
  assert remove_dict_element({'key1': 'value1', 'key2': 'value2'}, 'key1') == {'key2': 'value2'}
output: def remove_dict_element(d, key):
      if key in d:
          del d[key]
      return d