          declared_fields = copy.deepcopy(self._declared_fields)
          model = getattr(self.Meta, 'model')
          depth = getattr(self.Meta, 'depth', 0)
  
          # Retrieve metadata about fields & relationships on the model class.
          info = model_meta.get_field_info(model)
          field_names = self.get_field_names(declared_fields, info)
  
          # Determine any extra field arguments and hidden fields that
          # should be included
 
</s> remove         # Now determine the fields that should be included on the serializer.
        ret = OrderedDict()
 </s> add         # Determine the fields that should be included on the serializer.
        fields = OrderedDict()
 </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] </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
            )
        if depth is not None:
            assert depth >= 0, "'depth' may not be negative."
            assert depth <= 10, "'depth' may not be greater than 10."

          declared_fields = copy.deepcopy(self._declared_fields)
          model = getattr(self.Meta, 'model')
          depth = getattr(self.Meta, 'depth', 0)
  
        if depth is not None:
            assert depth >= 0, "'depth' may not be negative."
            assert depth <= 10, "'depth' may not be greater than 10."

          # Retrieve metadata about fields & relationships on the model class.
          info = model_meta.get_field_info(model)
          field_names = self.get_field_names(declared_fields, info)
  
          # Determine any extra field arguments and hidden fields that
          # should be included
keep keep keep add keep keep keep keep keep keep
 Final bits of docs for ModelSerializer fields API 
rest_framework/serializers.py