              # Create the serializer field.
              ret[field_name] = field_cls(**kwargs)
  
          # Add in any hidden fields.
          ret.update(hidden_fields)
  
          return ret
  
      # Methods for determining the set of field names to include...
  
 
</s> remove         return ret
 </s> add         return fields </s> remove             ret[field_name] = field_cls(**kwargs)
 </s> add             fields[field_name] = field_class(**field_kwargs) </s> remove             # Populate any kwargs defined in `Meta.extra_kwargs`
            kwargs = self.build_field_kwargs(kwargs, extra_kwargs, field_name)
 </s> add             # Include any kwargs defined in `Meta.extra_kwargs`
            field_kwargs = self.build_field_kwargs(
                field_kwargs, extra_kwargs, field_name
            ) </s> remove             field_cls, kwargs = self.build_field(field_name, info, model, depth)
 </s> add             field_class, field_kwargs = self.build_field(
                field_name, info, model, depth
            ) </s> remove                 # Field is explicitly declared on the class, use that.
                ret[field_name] = declared_fields[field_name]
 </s> add                 fields[field_name] = declared_fields[field_name]
        fields.update(hidden_fields)
              # Create the serializer field.
              ret[field_name] = field_cls(**kwargs)
  
          # Add in any hidden fields.
        fields.update(hidden_fields)
  
          return ret
  
      # Methods for determining the set of field names to include...
  
keep keep keep keep replace keep keep keep keep keep
 Final bits of docs for ModelSerializer fields API 
rest_framework/serializers.py