def get_nested_relation_kwargs(field_name, relation_info):
    """
    Creating a default instance of a nested serializer
    """
    kwargs = get_relation_kwargs(field_name, relation_info)
    kwargs.pop('queryset')
    kwargs.pop('required')
    kwargs['read_only'] = True
    return kwargs
Creating a default instance of a nested serializer