code: def read_raw(
      fname, *, preload=False, verbose=None, **kwargs
  ) -> BaseRaw:
      """Read raw file.
  
      This function is a convenient wrapper for readers defined in `mne.io`. The
      correct reader is automatically selected based on the detected file format.
      All function arguments are passed to the respective reader.
  
      The following readers are currently supported:
  
      `~mne.io.read_raw_artemis123`, `~mne.io.read_raw_bdf`,
      `~mne.io.read_raw_boxy`, `~mne.io.read_raw_brainvision`,
      `~mne.io.read_raw_cnt`, `~mne.io.read_raw_ctf`, `~mne.io.read_raw_edf`,
      `~mne.io.read_raw_eeglab`, `~mne.io.read_raw_egi`,
      `~mne.io.read_raw_eximia`, `~mne.io.read_raw_fieldtrip`,
      `~mne.io.read_raw_fif`,  `~mne.io.read_raw_gdf`, `~mne.io.read_raw_kit`,
      `~mne.io.read_raw_fil`,
      `~mne.io.read_raw_nicolet`, `~mne.io.read_raw_nirx`,
      `~mne.io.read_raw_curry`, and `~mne.io.read_raw_nedf`.
  
      Parameters
      ----------
      fname : path-like
          Name of the file to read.
      %(preload)s
      %(verbose)s
      **kwargs
          Additional keyword arguments to pass to the underlying reader. For
          details, see the arguments of the reader for the respective file
          format.
  
      Returns
      -------
      raw : mne.io.Raw
          Raw object.
      """
      _, ext = split_name_ext(fname)
      kwargs["verbose"] = verbose
      kwargs["preload"] = preload
      readers = _get_readers()
      if ext not in readers:
          _read_unsupported(fname)
      these_readers = list(readers[ext].values())
      for reader in these_readers:
          try:
              return reader(fname, **kwargs)
          except Exception:
              if len(these_readers) == 1:
                  raise
      else:
          choices = "\n".join(
              f"mne.io.{func.__name__.ljust(20)} ({kind})"
              for kind, func in readers[ext].items()
          )
          raise RuntimeError(
              "Could not read file using any of the possible readers for "
              f"extension {ext}. Consider trying to read the file directly with "
              f"one of:\n{choices}"
          )
  
file_path: mne-python/mne/io/_read_raw.py
imports: from functools import partial
  from pathlib import Path
  from ..utils import fill_doc
  from .base import BaseRaw
label_desc: Use image node_id 5 for calling a global function with example usage: read_raw(fname) and returns: reader