      # class UserSerializer(ModelSerializer):
      #     ...
      #     profile = ProfileSerializer()
      assert not any(
          isinstance(field, BaseSerializer) and (key in validated_data)
          and isinstance(validated_data[key], (list, dict))
          for key, field in serializer.fields.items()
      ), (
          'The `.{method_name}()` method does not support writable nested'
          'fields by default.\nWrite an explicit `.{method_name}()` method for '
          'serializer `{module}.{class_name}`, or set `read_only=True` on '
 
</s> remove         '.' in field.source and (key in validated_data)
        and isinstance(validated_data[key], (list, dict))
 </s> add         '.' in field.source and
        (key in validated_data) and
        isinstance(validated_data[key], (list, dict)) </s> remove                 not getattr(view, 'get_serializer', None)
                or not any(is_form_media_type(parser.media_type) for parser in view.parser_classes)
 </s> add                 not getattr(view, 'get_serializer', None) or
                not any(is_form_media_type(parser.media_type) for parser in view.parser_classes) </s> remove             if not (api_settings.FORM_CONTENT_OVERRIDE
                    and api_settings.FORM_CONTENTTYPE_OVERRIDE):
 </s> add             if not (api_settings.FORM_CONTENT_OVERRIDE and
                    api_settings.FORM_CONTENTTYPE_OVERRIDE): </s> remove                 if field.get_value(self.initial_data) is not empty
                and not field.read_only
 </s> add                 if (field.get_value(self.initial_data) is not empty) and
                not field.read_only </s> remove             not USE_FORM_OVERLOADING
            or self._request.method != 'POST'
            or not is_form_media_type(self._content_type)
 </s> add             self._request.method != 'POST' or
            not USE_FORM_OVERLOADING or
            not is_form_media_type(self._content_type)
        isinstance(field, BaseSerializer) and
        (key in validated_data) and
        isinstance(validated_data[key], (list, dict))
      # class UserSerializer(ModelSerializer):
      #     ...
      #     profile = ProfileSerializer()
      assert not any(
        isinstance(field, BaseSerializer) and
        (key in validated_data) and
        isinstance(validated_data[key], (list, dict))
        isinstance(field, BaseSerializer) and
        (key in validated_data) and
        isinstance(validated_data[key], (list, dict))
          for key, field in serializer.fields.items()
      ), (
          'The `.{method_name}()` method does not support writable nested'
          'fields by default.\nWrite an explicit `.{method_name}()` method for '
          'serializer `{module}.{class_name}`, or set `read_only=True` on '
keep keep keep keep replace replace keep keep keep keep keep
 Fixes for latest pep8 updates. Refs #2563. 
rest_framework/serializers.py