code: def process_link(
      self,
      env: BuildEnvironment,
      refnode: Element,
      has_explicit_title: bool,
      title: str,
      target: str,
  ) -> tuple[str, str]:
      # basically what sphinx.domains.python.PyXRefRole does
      refnode["js:object"] = env.ref_context.get("js:object")
      refnode["js:module"] = env.ref_context.get("js:module")
      if not has_explicit_title:
          title = title.lstrip(".")
          target = target.lstrip("~")
          if title[0:1] == "~":
              title = title[1:]
              dot = title.rfind(".")
              if dot != -1:
                  title = title[dot + 1 :]
      if target[0:1] == ".":
          target = target[1:]
          refnode["refspecific"] = True
      return title, target
  
imports: from __future__ import annotations
  import contextlib
  from typing import TYPE_CHECKING, Any, cast
  from docutils import nodes
  from docutils.parsers.rst import directives
  from sphinx import addnodes
  from sphinx.directives import ObjectDescription
  from sphinx.domains import Domain, ObjType
  from sphinx.domains.python import _pseudo_parse_arglist
  from sphinx.locale import _, __
  from sphinx.roles import XRefRole
  from sphinx.util import logging
  from sphinx.util.docfields import Field, GroupedField, TypedField
  from sphinx.util.docutils import SphinxDirective
  from sphinx.util.nodes import make_id, make_refnode, nested_parse_with_titles
label_desc: Use image node_id 1 for calling the JSXRefRole obj's underlying member method code with example usage: obj.process_link(env, refnode, has_explicit_title, title, target) and returns: title,  target