          `Meta.fields` option is not specified.
          """
          return (
              [model_info.pk.name] +
              list(declared_fields.keys()) +
              list(model_info.fields.keys()) +
              list(model_info.forward_relations.keys())
          )
  
      # Methods for constructing serializer fields...
  
      def build_field(self, field_name, info, model_class, nested_depth):
 
</s> remove             list(declared_fields.keys()) +
            list(model_info.fields.keys()) +
            list(model_info.forward_relations.keys())
 </s> add             list(declared_fields) +
            list(model_info.fields) +
            list(model_info.forward_relations) </s> remove                     ', '.join(["'" + fmt + "'" for fmt in self.renderer_classes.keys()])
 </s> add                     ', '.join(["'" + fmt + "'" for fmt in self.renderer_classes]) </s> remove             list(self.Meta.model._meta.parents.keys())
 </s> add             list(self.Meta.model._meta.parents) </s> remove         for parent_class in [model] + list(model._meta.parents.keys()):
 </s> add         for parent_class in [model] + list(model._meta.parents): </s> remove         assert set(serializer.data.keys()) == {'name', 'ref'}
 </s> add         assert set(serializer.data) == {'name', 'ref'}
            list(declared_fields) +
            list(model_info.fields) +
            list(model_info.forward_relations)
          `Meta.fields` option is not specified.
          """
          return (
              [model_info.pk.name] +
            list(declared_fields) +
            list(model_info.fields) +
            list(model_info.forward_relations)
            list(declared_fields) +
            list(model_info.fields) +
            list(model_info.forward_relations)
            list(declared_fields) +
            list(model_info.fields) +
            list(model_info.forward_relations)
          )
  
      # Methods for constructing serializer fields...
  
      def build_field(self, field_name, info, model_class, nested_depth):
keep keep keep keep replace replace replace keep keep keep keep keep
 Perfer iter(dict) over iter(dict.keys()) (#5736)

Calling dict.keys() is unnecessary. The two are functionally equivalent
on modern Pythons.

Inspired by Lennart Regebro's talk "Prehistoric Patterns in Python" from
PyCon 2017.

https://www.youtube.com/watch?v=V5-JH23Vk0I 
rest_framework/serializers.py