text: from rest_framework import serializers
  
  from instagram_clone.users.models import User
  from . import models
  
  
  class CommentSerializer(serializers.ModelSerializer):
      class Meta:
          model = models.Comment
          fields = '__all__'
  
  
  class LikeSerializer(serializers.ModelSerializer):
      class Meta:
          model = models.Like
          fields = '__all__'
  
  
  class FeedUserSerializer(serializers.ModelSerializer):
      class Meta:
          model = User
          fields = (
              'username',
              'profile_image',
          )
  
  
  class ImageSerializer(serializers.ModelSerializer):
      comments = CommentSerializer(many=True)
      creator = FeedUserSerializer()
  
      class Meta:
          model = models.Image
          fields = (
              'file',
              'location',
              'caption',
              'creator',
              'comments',
              'count_likes',
          )
  