def removeKey(d, key):
  """Returns a dictionary with a key removed

  Args:
      d: a dictionary
      key: the key to be removed

  Returns:
      copy: a copy of the dictionary d with the key removed

  """
  copy = dict(d)
  del copy[key]
  return copy