code: def _read_from_url(url: str, *, config: Config) -> IO:
      """Reads data from *url* with an HTTP *GET*.
  
      This function supports fetching from resources which use basic HTTP auth as
      laid out by RFC1738 § 3.1. See § 5 for grammar definitions for URLs.
  
      .. seealso:
  
         https://www.ietf.org/rfc/rfc1738.txt
  
      :param url: URL of an HTTP resource
      :type url: ``str``
  
      :return: data read from resource described by *url*
      :rtype: ``file``-like object
      """
      r = requests.get(
          url,
          stream=True,
          timeout=config.intersphinx_timeout,
          _user_agent=config.user_agent,
          _tls_info=(config.tls_verify, config.tls_cacerts),
      )
      r.raise_for_status()
      r.raw.url = r.url
      # decode content-body based on the header.
      # ref: https://github.com/psf/requests/issues/2155
      r.raw.read = functools.partial(r.raw.read, decode_content=True)
      return r.raw
  
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 2 for calling a global function with example usage: _read_from_url(url) and returns: r