code: def make_url(name_or_url: Union[str, URL]) -> URL:
      """Given a string, produce a new URL instance.
  
      The format of the URL generally follows `RFC-1738
      <https://www.ietf.org/rfc/rfc1738.txt>`_, with some exceptions, including
      that underscores, and not dashes or periods, are accepted within the
      "scheme" portion.
  
      If a :class:`.URL` object is passed, it is returned as is.
  
      .. seealso::
  
          :ref:`database_urls`
  
      """
  
      if isinstance(name_or_url, str):
          return _parse_url(name_or_url)
      elif not isinstance(name_or_url, URL) and not hasattr(
          name_or_url, "_sqla_is_testing_if_this_is_a_mock_object"
      ):
          raise exc.ArgumentError(
              f"Expected string or URL object, got {name_or_url!r}"
          )
      else:
          return name_or_url
  
imports: from __future__ import annotations
  import collections.abc
  import re
  from typing import Any
  from typing import cast
  from typing import Dict
  from typing import Iterable
  from typing import List
  from typing import Mapping
  from typing import NamedTuple
  from typing import Optional
  from typing import overload
  from typing import Sequence
  from typing import Tuple
  from typing import Type
  from typing import Union
  from urllib.parse import parse_qsl
  from urllib.parse import quote
  from urllib.parse import quote_plus
  from urllib.parse import unquote
  from .interfaces import Dialect
  from ..None import exc
  from ..None import util
  from ..dialects import plugins
  from ..dialects import registry
label_desc: Use image node_id 1 for calling a global function with example usage: make_url(name_or_url) and returns: _parse_url, name_or_url