class_docstr: Description of a JavaScript object.
class_docstr_tok: ["Description","of","a","JavaScript","object","."]
docstr: Breaks down construct signatures
  
  Parses out prefix and argument list from construct definition. The
  namespace and class will be determined by the nesting of domain
  directives.
docstr_tok: ["Breaks","down","construct","signatures","Parses","out","prefix","and","argument","list","from","construct","definition",".","The","namespace","and","class","will","be","determined","by","the","nesting","of","domain","directives","."]
code: def handle_signature(
      self, sig: str, signode: desc_signature
  ) -> tuple[str, str]:
      """Breaks down construct signatures
  
      Parses out prefix and argument list from construct definition. The
      namespace and class will be determined by the nesting of domain
      directives.
      """
      sig = sig.strip()
      if "(" in sig and sig[-1:] == ")":
          member, arglist = sig.split("(", 1)
          member = member.strip()
          arglist = arglist[:-1].strip()
      else:
          member = sig
          arglist = None
      # If construct is nested, prefix the current prefix
      prefix = self.env.ref_context.get("js:object", None)
      mod_name = self.env.ref_context.get("js:module")
  
      name = member
      try:
          member_prefix, member_name = member.rsplit(".", 1)
      except ValueError:
          member_name = name
          member_prefix = ""
      finally:
          name = member_name
          if prefix and member_prefix:
              prefix = f"{prefix}.{member_prefix}"
          elif prefix is None and member_prefix:
              prefix = member_prefix
      fullname = name
      if prefix:
          fullname = f"{prefix}.{name}"
  
      signode["module"] = mod_name
      signode["object"] = prefix
      signode["fullname"] = fullname
  
      max_len = (
          self.env.config.javascript_maximum_signature_line_length
          or self.env.config.maximum_signature_line_length
          or 0
      )
      multi_line_parameter_list = (
          "single-line-parameter-list" not in self.options
          and (len(sig) > max_len > 0)
      )
  
      display_prefix = self.get_display_prefix()
      if display_prefix:
          signode += addnodes.desc_annotation("", "", *display_prefix)
  
      actual_prefix = None
      if prefix:
          actual_prefix = prefix
      elif mod_name:
          actual_prefix = mod_name
      if actual_prefix:
          addName = addnodes.desc_addname("", "")
          for p in actual_prefix.split("."):
              addName += addnodes.desc_sig_name(p, p)
              addName += addnodes.desc_sig_punctuation(".", ".")
          signode += addName
      signode += addnodes.desc_name(
          "", "", addnodes.desc_sig_name(name, name)
      )
      if self.has_arguments:
          if not arglist:
              signode += addnodes.desc_parameterlist()
          else:
              _pseudo_parse_arglist(
                  signode, arglist, multi_line_parameter_list
              )
      return fullname, prefix
  
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 2 for calling the JSObject obj's underlying member method code with example usage: obj.handle_signature(sig, signode) and returns: fullname,  prefix