code: def make_link_node(rawtext, app, type, slug, options):
      """Create a link to a github resource.
  
      :param rawtext: Text being replaced with link node.
      :param app: Sphinx application context
      :param type: Link type (issues, changeset, etc.)
      :param slug: ID of the thing to link to
      :param options: Options dictionary passed to role func.
      """
  
      try:
          base = app.config.github_project_url
          if not base:
              raise AttributeError
          if not base.endswith("/"):
              base += "/"
      except AttributeError as err:
          raise ValueError(
              "github_project_url configuration value is not set (%s)"
              % str(err)
          )
  
      ref = base + type + "/" + slug + "/"
      set_classes(options)
      prefix = "#"
      if type == "pull":
          prefix = "PR " + prefix
      node = nodes.reference(
          rawtext, prefix + utils.unescape(slug), 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 1 for calling a global function with example usage: make_link_node(rawtext, app, type, slug, options) and returns: node