              for key, value in self.get_fields().items():
                  self._fields[key] = value
          return self._fields
  
      def get_fields(self):
          """
          Returns a dictionary of {field_name: field_instance}.
          """
          # Every new serializer is created with a clone of the field instances.
 
</s> remove         fields = [
            field for field in self.fields.values()
            if (not field.read_only) or (field.default is not empty)
        ]
 </s> add         fields = self._to_internal_value_fields </s> remove         fields = [field for field in self.fields.values() if not field.write_only]
 </s> add         fields = self._to_representation_fields
    @cached_property
    def _to_internal_value_fields(self):
        return [
            field for field in self.fields.values()
            if (not field.read_only) or (field.default is not empty)
        ]

    @cached_property
    def _to_representation_fields(self):
        return [field for field in self.fields.values() if not field.write_only]

              for key, value in self.get_fields().items():
                  self._fields[key] = value
          return self._fields
  
    @cached_property
    def _to_internal_value_fields(self):
        return [
            field for field in self.fields.values()
            if (not field.read_only) or (field.default is not empty)
        ]

    @cached_property
    def _to_representation_fields(self):
        return [field for field in self.fields.values() if not field.write_only]

      def get_fields(self):
          """
          Returns a dictionary of {field_name: field_instance}.
          """
          # Every new serializer is created with a clone of the field instances.
keep keep keep add keep keep keep keep keep
 Cache fields list for to_internal_value and to_representation. 
rest_framework/serializers.py