code: def _normalize_relationships(relationships):
          
  
          ret = {}
  
          for key, val in relationships.items():
              if not val['data']:
                  ret[key] = None
              else:
                  ret[key] = val['data']['id']
  
          return ret
docs: Get all the relationships by key/val & return them
  
          A normalized relationship dict uses the key name without
          any alteration but the value will be the `id` provided
          in the payload if present. If not present, then the client
          wants to unset the relationship so it will be set to None.
  
          INFO: only works for to-one relationships.
  
          :param relationships:
              dict JSON API relationships object
          :return: dict