code: def normalize(self, body):
          
  
          resource = body['data']
          data = {'rtype': resource['type']}
  
          if 'attributes' in resource:
              attributes = resource['attributes']
              attributes = self._normalize_attributes(attributes)
  
              data.update(attributes)
  
          if 'relationships' in resource:
              relationships = resource['relationships']
              relationships = self._normalize_relationships(relationships)
  
              data.update(relationships)
  
          if resource.get('id'):
              data['rid'] = resource['id']
  
          return data
docs: Invoke the JSON API normalizer
  
          Perform the following:
  
              * add the type as a rtype property
              * flatten the payload
              * add the id as a rid property ONLY if present
  
          We don't need to vet the inputs much because the Parser
          has already done all the work.
  
          :param body:
              the already vetted & parsed payload
          :return:
              normalized dict