code: def getstate(d):
      '''Deep copies a dict, and returns it without the keys _links and
      _embedded
      '''
      if not isinstance(d, dict):
          raise TypeError("Can only get the state of a dictionary")
      cpd = copy.deepcopy(d)
      cpd.pop('_links', None)
      cpd.pop('_embedded', None)
      return cpf getstate(d):
      '''Deep copies a dict, and returns it without the keys _links and
      _embedded
      '''
      if not isinstance(d, dict):
          raise TypeError("Can only get the state of a dictionary")
      cpd = copy.deepcopy(d)
      cpd.pop('_links', None)
      cpd.pop('_embedded', None)
      return cpd
docs: Deep copies a dict, and returns it without the keys _links and
      _embedded