code: def get_fields_in_model(instance):
      
      assert isinstance(instance, Model)
  
      # Check if the Django 1.8 _meta API is available
      use_api = hasattr(instance._meta, 'get_fields') and callable(instance._meta.get_fields)
  
      if use_api:
          return [f for f in instance._meta.get_fields() if track_field(f)]
      return instance._meta.fields
docs: Returns the list of fields in the given model instance. Checks whether to use the official _meta API or use the raw
      data. This method excludes many to many fields.
  
      :param instance: The model instance to get the fields for
      :type instance: Model
      :return: The list of fields for the given model (instance)
      :rtype: list