def METHOD_NAME(self, obj):
    ns_name = obj.collection.namespace.name
    name = obj.collection.name
    result = {
        'id': obj.collection.pk,
        'href': reverse(
            'api:v2:collection-detail',
            kwargs={'namespace': ns_name, 'name': name},
            request=self.context.get('request'),
        ),
        'name': name,
    }
    return result