docs: def _render_full_resource(self, instance, include, fields):
          """
          Generate a representation of a full resource to match JSON API spec.
  
          :param instance: The instance to serialize
          :param include: Dictionary of relationships to include
          :param fields: Dictionary of fields to filter
          """
          api_type = instance.__jsonapi_type__
          orm_desc_keys = instance.__mapper__.all_orm_descriptors.keys()
          to_ret = {
              'id': instance.id,
              'type': api_type,
              'attributes': {},
              'relationships': {},
              'included': {}
          }
          attrs_to_ignore = {'__mapper__', 'id'}
          if api_type in fields.keys():
              local_fields = list(map((
                  lambda x: instance.__jsonapi_map_to_py__[x]),
                  fields[api_type]))
          else:
              local_fields = orm_desc_keys
  
          for key, relationship in instance.__mapper__.relationships.items():
              attrs_to_ignore |= set([c.name for c in relationship.local_columns
                                      ]) | {key}
  
              api_key = instance.__jsonapi_map_to_api__[key]
  
              try:
                  desc = get_rel_desc(instance, key, RelationshipActions.GET)
              except PermissionDeniedError:
                  continue
  
              if relationship.direction == MANYTOONE:
                  if key in local_fields:
                      to_ret['relationships'][api_key] = {
                          'links': self._lazy_relationship(api_type, instance.id,
                                                           api_key)
                      }
  
                  if api_key in include.keys():
                      related = desc(instance)
                      if related is not None:
                          perm = get_permission_test(
                              related, None, Permissions.VIEW)
                      if (key in local_fields
                              and (related is None or not perm(related))):
                          to_ret['relationships'][api_key]['data'] = None
                          continue
                      if key in local_fields:
                          to_ret['relationships'][api_key]['data'] = self._render_short_instance(related)  # NOQA
                      new_include = self._parse_include(include[api_key])
                      built = self._render_full_resource(
                          related, new_include, fields)
                      included = built.pop('included')
                      to_ret['included'].update(included)
                      to_ret['included'][(related.__jsonapi_type__, related.id)] = built  # NOQA
  
              else:
  
                  if key in local_fields:
                      to_ret['relationships'][api_key] = {
                          'links': self._lazy_relationship(
                              api_type, instance.id, api_key),
                      }
  
                  if api_key not in include.keys():
                      continue
  
                  if key in local_fields:
                      to_ret['relationships'][api_key]['data'] = []
  
                  related = desc(instance)
  
                  for item in related:
                      try:
                          check_permission(item, None, Permissions.VIEW)
                      except PermissionDeniedError:
                          continue
  
                      if key in local_fields:
                          to_ret['relationships'][api_key]['data'].append(
                              self._render_short_instance(item))
  
                      new_include = self._parse_include(include[api_key])
                      built = self._render_full_resource(item, new_include,
                                                         fields)
                      included = built.pop('included')
                      to_ret['included'].update(included)
                      to_ret['included'][(item.__jsonapi_type__, item.id)] = built  # NOQA
  
          for key in set(orm_desc_keys) - attrs_to_ignore:
              try:
                  desc = get_attr_desc(instance, key, AttributeActions.GET)
                  if key in local_fields:
                      to_ret['attributes'][instance.__jsonapi_map_to_api__[key]] = desc(instance)  # NOQA
              except PermissionDeniedError:
                  continue
  
          return to_ret