code: def ghcommit_role(
      name, rawtext, text, lineno, inliner, options={}, content=[]
  ):
      """
      Link to a GitHub commit.
  
      Returns 2 part tuple containing list of nodes to insert into the
      document and a list of system messages.  Both are allowed to be
      empty.
  
      :param name: The role name used in the document.
      :param rawtext: The entire markup snippet, with role.
      :param text: The text marked with the role.
      :param lineno: The line number where rawtext appears in the input.
      :param inliner: The inliner instance that called us.
      :param options: Directive options for customization.
      :param content: The directive content for customization.
      """
      app = inliner.document.settings.env.app
      try:
          base = app.config.github_project_url
          if not base:
              raise AttributeError
          if not base.endswith("/"):
              base += "/"
      except AttributeError as err:
          raise ValueError(
              f"github_project_url configuration value is not set "
              f"({err})"
          ) from err
  
      ref = base + text
      node = nodes.reference(rawtext, text[:6], refuri=ref, **options)
      return [node], []
  
imports: from docutils import nodes, utils
  from docutils.parsers.rst.roles import set_classes
label_desc: Use image node_id 4 for calling a global function with example usage: ghcommit_role(name, rawtext, text, lineno, inliner, options, content) and returns: list,  list