          # Get the explicitly declared fields
          base_fields = copy.deepcopy(self.base_fields)
          for key, field in base_fields.items():
              ret[key] = field
              # Set up the field
              field.initialize(parent=self, field_name=key)
  
          # Add in the default fields
          default_fields = self.get_default_fields()
          for key, val in default_fields.items():
              if key not in ret:
 
</s> remove     def __init__(self, instance=None, data=None, files=None, context=None, partial=False, **kwargs):
 </s> add     def __init__(self, instance=None, data=None, files=None,
                 context=None, partial=False, **kwargs): </s> remove     ManyToManyModel, Person, ReadOnlyManyToManyModel)
 </s> add     ManyToManyModel, Person, ReadOnlyManyToManyModel, Photo)
          # Get the explicitly declared fields
          base_fields = copy.deepcopy(self.base_fields)
          for key, field in base_fields.items():
              ret[key] = field


  
          # Add in the default fields
          default_fields = self.get_default_fields()
          for key, val in default_fields.items():
              if key not in ret:
keep keep keep keep replace replace keep keep keep keep keep
 Clean up field initialization.  Fixes #497 
rest_framework/serializers.py