def link(endpoint=None, is_for_list=False, **kwargs):
    """
    Used to mark a method on a ViewSet that should be routed for GET requests.
    """
    msg = 'link is pending deprecation. Use detail_route instead.'
    warnings.warn(msg, PendingDeprecationWarning, stacklevel=2)

    def decorator(func):
        func.bind_to_methods = ['get']
        func.kwargs = kwargs
        func.endpoint = endpoint and func.__name__
        func.is_for_list = is_for_list
        return func
    return decorator
dataset/ETHPy150Open chibisov/drf-extensions/rest_framework_extensions/decorators.py/link/operator `or` -> `and`