prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  use small images in user avatar in moderators list
  
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `euth/users/serializers.py`
  Content:
  ```
  1 from rest_framework import serializers
  2 
  3 from .models import User
  4 
  5 
  6 class UserSerializer(serializers.ModelSerializer):
  7     avatar = serializers.ImageField()
  8 
  9     class Meta:
  10         model = User
  11         fields = ('id', 'username', 'avatar', 'default_avatar')
  12         read_only_fields = ('id', 'username', 'avatar', 'default_avatar')
  13 
  14 
  15 # mails should not be exposed in API, so there is a separate one for this
  16 class UserWithMailSerializer(UserSerializer):
  17     class Meta(UserSerializer.Meta):
  18         fields = ('id', 'username', 'avatar', 'default_avatar', 'email')
  19         read_only_fields = ('id', 'username', 'avatar', 'default_avatar',
  20                             'email')
  21
  ```
  --- END FILES ---
  
  Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.
  
  Here is an example:
  
  ```diff
  diff --git a/examples/server_async.py b/examples/server_async.py
  --- a/examples/server_async.py
  +++ b/examples/server_async.py
  @@ -313,4 +313,4 @@
   
   
   if __name__ == "__main__":
  -    asyncio.run(run_async_server("."), debug=True)
  +    asyncio.run(run_async_server(), debug=True)
  diff --git a/examples/server_sync.py b/examples/server_sync.py
  --- a/examples/server_sync.py
  +++ b/examples/server_sync.py
  @@ -313,5 +313,5 @@
   
   
   if __name__ == "__main__":
  -    server = run_sync_server(".")
  +    server = run_sync_server()
       server.shutdown()
  
  ```
  
golden_diff: diff --git a/euth/users/serializers.py b/euth/users/serializers.py
  --- a/euth/users/serializers.py
  +++ b/euth/users/serializers.py
  @@ -1,16 +1,22 @@
  +from easy_thumbnails.files import get_thumbnailer
   from rest_framework import serializers
   
   from .models import User
   
   
   class UserSerializer(serializers.ModelSerializer):
  -    avatar = serializers.ImageField()
  +    avatar = serializers.SerializerMethodField()
   
       class Meta:
           model = User
           fields = ('id', 'username', 'avatar', 'default_avatar')
           read_only_fields = ('id', 'username', 'avatar', 'default_avatar')
   
  +    def get_avatar(self, obj):
  +        if obj.avatar:
  +            image = get_thumbnailer(obj.avatar)['avatar_small']
  +            return image.url
  +
   
   # mails should not be exposed in API, so there is a separate one for this
   class UserWithMailSerializer(UserSerializer):
  
verification_info: {"golden_diff": "diff --git a/euth/users/serializers.py b/euth/users/serializers.py\n--- a/euth/users/serializers.py\n+++ b/euth/users/serializers.py\n@@ -1,16 +1,22 @@\n+from easy_thumbnails.files import get_thumbnailer\n from rest_framework import serializers\n \n from .models import User\n \n \n class UserSerializer(serializers.ModelSerializer):\n-    avatar = serializers.ImageField()\n+    avatar = serializers.SerializerMethodField()\n \n     class Meta:\n         model = User\n         fields = ('id', 'username', 'avatar', 'default_avatar')\n         read_only_fields = ('id', 'username', 'avatar', 'default_avatar')\n \n+    def get_avatar(self, obj):\n+        if obj.avatar:\n+            image = get_thumbnailer(obj.avatar)['avatar_small']\n+            return image.url\n+\n \n # mails should not be exposed in API, so there is a separate one for this\n class UserWithMailSerializer(UserSerializer):\n", "issue": "use small images in user avatar in moderators list\n\n", "before_files": [{"content": "from rest_framework import serializers\n\nfrom .models import User\n\n\nclass UserSerializer(serializers.ModelSerializer):\n    avatar = serializers.ImageField()\n\n    class Meta:\n        model = User\n        fields = ('id', 'username', 'avatar', 'default_avatar')\n        read_only_fields = ('id', 'username', 'avatar', 'default_avatar')\n\n\n# mails should not be exposed in API, so there is a separate one for this\nclass UserWithMailSerializer(UserSerializer):\n    class Meta(UserSerializer.Meta):\n        fields = ('id', 'username', 'avatar', 'default_avatar', 'email')\n        read_only_fields = ('id', 'username', 'avatar', 'default_avatar',\n                            'email')\n", "path": "euth/users/serializers.py"}], "after_files": [{"content": "from easy_thumbnails.files import get_thumbnailer\nfrom rest_framework import serializers\n\nfrom .models import User\n\n\nclass UserSerializer(serializers.ModelSerializer):\n    avatar = serializers.SerializerMethodField()\n\n    class Meta:\n        model = User\n        fields = ('id', 'username', 'avatar', 'default_avatar')\n        read_only_fields = ('id', 'username', 'avatar', 'default_avatar')\n\n    def get_avatar(self, obj):\n        if obj.avatar:\n            image = get_thumbnailer(obj.avatar)['avatar_small']\n            return image.url\n\n\n# mails should not be exposed in API, so there is a separate one for this\nclass UserWithMailSerializer(UserSerializer):\n    class Meta(UserSerializer.Meta):\n        fields = ('id', 'username', 'avatar', 'default_avatar', 'email')\n        read_only_fields = ('id', 'username', 'avatar', 'default_avatar',\n                            'email')\n", "path": "euth/users/serializers.py"}]}