code: def get_role_name(self, name: str) -> tuple[str, str] | None:
      names = name.split(":")
      if len(names) == 1:
          # role
          default_domain = self.env.temp_data.get("default_domain")
          domain = default_domain.name if default_domain else None
          role = names[0]
      elif len(names) == 2:
          # domain:role:
          domain = names[0]
          role = names[1]
      else:
          return None
  
      if domain and self.is_existent_role(domain, role):
          return (domain, role)
      elif self.is_existent_role("std", role):
          return ("std", role)
      else:
          return None
  
imports: from __future__ import annotations
  import concurrent.futures
  import functools
  import posixpath
  import re
  import sys
  import time
  from os import path
  from typing import TYPE_CHECKING, cast
  from urllib.parse import urlsplit, urlunsplit
  from docutils import nodes
  from docutils.utils import relative_path
  import sphinx
  from sphinx.addnodes import pending_xref
  from sphinx.builders.html import INVENTORY_FILENAME
  from sphinx.errors import ExtensionError
  from sphinx.locale import _, __
  from sphinx.transforms.post_transforms import ReferencesResolver
  from sphinx.util import logging, requests
  from sphinx.util.docutils import CustomReSTDispatcher, SphinxRole
  from sphinx.util.inventory import InventoryFile
label_desc: Use image node_id 4 for calling the IntersphinxRole obj's underlying member method code with example usage: obj.get_role_name(name) and returns: domain,  role, None, str,  role, None