          if self.opts.exclude:
              for key in self.opts.exclude:
                  ret.pop(key, None)
  
          return ret
  
      #####
      # Field methods - used when the serializer class is itself used as a field.
  
      def initialize(self, parent, field_name):
 
</s> remove             # Set up the field
            field.initialize(parent=self, field_name=key)
 </s> add  </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)
        # Initialize the fields
        for key, field in ret.items():
            field.initialize(parent=self, field_name=key)

          if self.opts.exclude:
              for key in self.opts.exclude:
                  ret.pop(key, None)
  
        # Initialize the fields
        for key, field in ret.items():
            field.initialize(parent=self, field_name=key)

          return ret
  
      #####
      # Field methods - used when the serializer class is itself used as a field.
  
      def initialize(self, parent, field_name):
keep keep keep add keep keep keep keep keep keep
 Clean up field initialization.  Fixes #497 
rest_framework/serializers.py