def is_link(c, path, use_sudo=False):
    """
    Return True if the given path is a symlink on the current remote host.

    If ``use_sudo`` is True, will use `.sudo` instead of `.run`.

    .. note::

       This function is derived from one copied from fabric v1.
    """
    func = c.sudo if use_sudo else c.run
    cmd = 'test -L "$(echo %s)"' % path
    result = func(cmd)
    return False if result.failed else True
