def process_link(self, env: BuildEnvironment, refnode: Element, has_explicit_title: bool, title: str, target: str) -> Tuple[(str, str)]:
    refnode.attributes.update(env.ref_context)
    if (not has_explicit_title):
        title = anon_identifier_re.sub('[anonymous]', str(title))
    if (refnode['reftype'] == 'any'):
        if ((not has_explicit_title) and title.endswith('()')):
            title = title[:(- 2)]
        if target.endswith('()'):
            target = target[:(- 2)]
    if (not has_explicit_title):
        target = target.lstrip('~')
        if (title[:1] == '~'):
            title = title[1:]
            dcolon = title.rfind('::')
            if (dcolon != (- 1)):
                title = title[(dcolon + 2):]
    return (title, target)
def process_link(self, env: BuildEnvironment, refnode: Element, has_explicit_title: bool, title: str, target: str) -> Tuple[(str, str)]:
    refnode.attributes.update(env.ref_context)
    if (not has_explicit_title):
        title = anon_identifier_re.sub('[anonymous]', str(title))
    if (refnode['reftype'] == 'any'):
        if ((not has_explicit_title) and title.endswith('()')):
            title = title[:(- 2)]
        if target.endswith('()'):
            target = target[:(- 2)]
    if (not has_explicit_title):
        target = target.lstrip('~')
        if (title[:1] == '~'):
            title = title[1:]
            dcolon = title.rfind('::')
            if (dcolon != (- 1)):
                title = title[(dcolon + 2):]
    return (title, target)