code: def launch(url, wait=False, locate=False):
      """This function launches the given URL (or filename) in the default
      viewer application for this file type.  If this is an executable, it
      might launch the executable in a new session.  The return value is
      the exit code of the launched application.  Usually, ``0`` indicates
      success.
  
      Examples::
  
          click.launch('https://click.palletsprojects.com/')
          click.launch('/my/downloaded/file', locate=True)
  
      .. versionadded:: 2.0
  
      :param url: URL or filename of the thing to launch.
      :param wait: waits for the program to stop.
      :param locate: if this is set to `True` then instead of launching the
                     application associated with the URL it will attempt to
                     launch a file manager with the file located.  This
                     might have weird effects if the URL does not point to
                     the filesystem.
      """
      from ._termui_impl import open_url
  
      return open_url(url, wait=wait, locate=locate)
  
imports: import inspect
  import io
  import itertools
  import os
  import struct
  import sys
  from ._compat import DEFAULT_COLUMNS
  from ._compat import get_winterm_size
  from ._compat import isatty
  from ._compat import raw_input
  from ._compat import string_types
  from ._compat import strip_ansi
  from ._compat import text_type
  from ._compat import WIN
  from .exceptions import Abort
  from .exceptions import UsageError
  from .globals import resolve_color_default
  from .types import Choice
  from .types import convert_type
  from .types import Path
  from .utils import echo
  from .utils import LazyFile
label_desc: Use image node_id 14 for calling a global function with example usage: launch(url, wait, locate) and returns: open_url