code: def assoc(_d, key, value):
      
      d = deepcopy(_d)
      d[key] = value
      return d
docs: Associate a key with a value in a dictionary
  
      :param _d: a dictionary
      :param key: a key in the dictionary
      :param value: a value for the key
      :returns: a new dictionary
  
      >>> data = {}
      >>> new_data = assoc(data, 'name', 'Holy Grail')
      >>> new_data
      {'name': 'Holy Grail'}
      >>> data
      {}
  
      .. note:: the original dictionary is not modified