input: Write a function to delete a given key from a dictionary. If the key exists in the dictionary, it should be removed; otherwise, the dictionary should remain unchanged. If the dictionary is empty, return the empty dictionary.
  
  assert delete_key({'foo': 1, 'bar': 2, 'baz': 3}, 'baz')=={'foo': 1, 'bar': 2}
  assert delete_key({'a': 10, 'b': 20, 'c': 30}, 'd')=={'a': 10, 'b': 20, 'c': 30}
  assert delete_key({}, 'any_key')=={}
  assert delete_key({'single_key': 1}, 'single_key')=={}
output: def delete_key(d, key):
      if key in d:
          del d[key]
      return d