code: def read_raw_edf(
      input_fname,
      eog=None,
      misc=None,
      stim_channel="auto",
      exclude=(),
      infer_types=False,
      include=None,
      preload=False,
      units=None,
      encoding="utf8",
      *,
      verbose=None,
  ) -> RawEDF:
      """Reader function for EDF and EDF+ files.
  
      Parameters
      ----------
      input_fname : path-like
          Path to the EDF or EDF+ file.
      eog : list or tuple
          Names of channels or list of indices that should be designated EOG
          channels. Values should correspond to the electrodes in the file.
          Default is None.
      misc : list or tuple
          Names of channels or list of indices that should be designated MISC
          channels. Values should correspond to the electrodes in the file.
          Default is None.
      stim_channel : ``'auto'`` | str | list of str | int | list of int
          Defaults to ``'auto'``, which means that channels named ``'status'`` or
          ``'trigger'`` (case insensitive) are set to STIM. If str (or list of
          str), all channels matching the name(s) are set to STIM. If int (or
          list of ints), channels corresponding to the indices are set to STIM.
      exclude : list of str | str
          Channel names to exclude. This can help when reading data with
          different sampling rates to avoid unnecessary resampling. A str is
          interpreted as a regular expression.
      infer_types : bool
          If True, try to infer channel types from channel labels. If a channel
          label starts with a known type (such as 'EEG') followed by a space and
          a name (such as 'Fp1'), the channel type will be set accordingly, and
          the channel will be renamed to the original label without the prefix.
          For unknown prefixes, the type will be 'EEG' and the name will not be
          modified. If False, do not infer types and assume all channels are of
          type 'EEG'.
  
          .. versionadded:: 0.24.1
      include : list of str | str
          Channel names to be included. A str is interpreted as a regular
          expression. 'exclude' must be empty if include is assigned.
  
          .. versionadded:: 1.1
      %(preload)s
      %(units_edf_bdf_io)s
      %(encoding_edf)s
      %(verbose)s
  
      Returns
      -------
      raw : instance of RawEDF
          The raw instance.
          See :class:`mne.io.Raw` for documentation of attributes and methods.
  
      See Also
      --------
      mne.io.read_raw_bdf : Reader function for BDF files.
      mne.io.read_raw_gdf : Reader function for GDF files.
      mne.export.export_raw : Export function for EDF files.
      mne.io.Raw : Documentation of attributes and methods of RawEDF.
  
      Notes
      -----
      %(edf_resamp_note)s
  
      It is worth noting that in some special cases, it may be necessary to shift
      event values in order to retrieve correct event triggers. This depends on
      the triggering device used to perform the synchronization. For instance, in
      some files events need to be shifted by 8 bits:
  
          >>> events[:, 2] >>= 8  # doctest:+SKIP
  
      TAL channels called 'EDF Annotations' are parsed and extracted annotations
      are stored in raw.annotations. Use :func:`mne.events_from_annotations` to
      obtain events from these annotations.
  
      If channels named 'status' or 'trigger' are present, they are considered as
      STIM channels by default. Use func:`mne.find_events` to parse events
      encoded in such analog stim channels.
  
      The EDF specification allows optional storage of channel types in the
      prefix of the signal label for each channel. For example, ``EEG Fz``
      implies that ``Fz`` is an EEG channel and ``MISC E`` would imply ``E`` is
      a MISC channel. However, there is no standard way of specifying all
      channel types. MNE-Python will try to infer the channel type, when such a
      string exists, defaulting to EEG, when there is no prefix or the prefix is
      not recognized.
  
      The following prefix strings are mapped to MNE internal types:
  
          - 'EEG': 'eeg'
          - 'SEEG': 'seeg'
          - 'ECOG': 'ecog'
          - 'DBS': 'dbs'
          - 'EOG': 'eog'
          - 'ECG': 'ecg'
          - 'EMG': 'emg'
          - 'BIO': 'bio'
          - 'RESP': 'resp'
          - 'MISC': 'misc'
          - 'SAO2': 'bio'
  
      The EDF specification allows storage of subseconds in measurement date.
      However, this reader currently sets subseconds to 0 by default.
      """
      input_fname = os.path.abspath(input_fname)
      ext = os.path.splitext(input_fname)[1][1:].lower()
      if ext != "edf":
          raise NotImplementedError(
              f"Only EDF files are supported, got {ext}."
          )
      return RawEDF(
          input_fname=input_fname,
          eog=eog,
          misc=misc,
          stim_channel=stim_channel,
          exclude=exclude,
          infer_types=infer_types,
          preload=preload,
          include=include,
          units=units,
          encoding=encoding,
          verbose=verbose,
      )
  
imports: import os
  import re
  from datetime import datetime, timedelta, timezone
  import numpy
  from scipy.interpolate import interp1d
  from ..._fiff.constants import FIFF
  from ..._fiff.meas_info import _empty_info, _unique_channel_names
  from ..._fiff.utils import _blk_read_lims, _mult_cal_one
  from ...annotations import Annotations
  from ...filter import resample
  from ...utils import _validate_type, fill_doc, logger, verbose, warn
  from ..base import BaseRaw, _get_scaling
label_desc: Use image node_id 14 for calling a global function with example usage: read_raw_edf(input_fname, eog, misc, stim_channel, exclude, infer_types, include, preload, units, encoding) and returns: RawEDF