class_docstr: Raw object from EDF, EDF+ or BDF file.
  
  Parameters
  ----------
  input_fname : path-like
      Path to the EDF, EDF+ or BDF 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), the channels corresponding to the indices are set to
      STIM.
  exclude : list of str
      Channel names to exclude. This can help when reading data with
      different sampling rates to avoid unnecessary resampling.
  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
  
  See Also
  --------
  mne.io.Raw : Documentation of attributes and methods.
  mne.io.read_raw_edf : Recommended way to read EDF/EDF+ files.
  mne.io.read_raw_bdf : Recommended way to read BDF files.
  
  Notes
  -----
  %(edf_resamp_note)s
  
  Biosemi devices trigger codes are encoded in 16-bit format, whereas system
  codes (CMS in/out-of range, battery low, etc.) are coded in bits 16-23 of
  the status channel (see http://www.biosemi.com/faq/trigger_signals.htm).
  To retrieve correct event values (bits 1-16), one could do:
  
      >>> events = mne.find_events(...)  # doctest:+SKIP
      >>> events[:, 2] &= (2**16 - 1)  # doctest:+SKIP
  
  The above operation can be carried out directly in :func:`mne.find_events`
  using the ``mask`` and ``mask_type`` parameters (see
  :func:`mne.find_events` for more details).
  
  It is also possible to retrieve system codes, but no particular effort has
  been made to decode these in MNE. In case it is necessary, for instance to
  check the CMS bit, the following operation can be carried out:
  
      >>> cms_bit = 20  # doctest:+SKIP
      >>> cms_high = (events[:, 2] & (1 << cms_bit)) != 0  # doctest:+SKIP
  
  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' or 'BDF 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.
code: def __init__(
      self,
      input_fname,
      eog=None,
      misc=None,
      stim_channel="auto",
      exclude=(),
      infer_types=False,
      preload=False,
      include=None,
      units=None,
      encoding="utf8",
      *,
      verbose=None,
  ):
      logger.info(f"Extracting EDF parameters from {input_fname}...")
      input_fname = os.path.abspath(input_fname)
      info, edf_info, orig_units = _get_info(
          input_fname,
          stim_channel,
          eog,
          misc,
          exclude,
          infer_types,
          preload,
          include,
      )
      logger.info("Creating raw.info structure...")
  
      _validate_type(units, (str, None, dict), "units")
      if units is None:
          units = dict()
      elif isinstance(units, str):
          units = {ch_name: units for ch_name in info["ch_names"]}
  
      for k, (this_ch, this_unit) in enumerate(orig_units.items()):
          if this_ch not in units:
              continue
          if this_unit not in ("", units[this_ch]):
              raise ValueError(
                  f"Unit for channel {this_ch} is present in the file as "
                  f"{repr(this_unit)}, cannot overwrite it with the units "
                  f"argument {repr(units[this_ch])}."
              )
          if this_unit == "":
              orig_units[this_ch] = units[this_ch]
              ch_type = edf_info["ch_types"][k]
              scaling = _get_scaling(
                  ch_type.lower(), orig_units[this_ch]
              )
              edf_info["units"][k] /= scaling
  
      # Raw attributes
      last_samps = [edf_info["nsamples"] - 1]
      super().__init__(
          info,
          preload,
          filenames=[input_fname],
          raw_extras=[edf_info],
          last_samps=last_samps,
          orig_format="int",
          orig_units=orig_units,
          verbose=verbose,
      )
  
      # Read annotations from file and set it
      if len(edf_info["tal_idx"]) > 0:
          # Read TAL data exploiting the header info (no regexp)
          idx = np.empty(0, int)
          tal_data = self._read_segment_file(
              np.empty((0, self.n_times)),
              idx,
              0,
              0,
              int(self.n_times),
              np.ones((len(idx), 1)),
              None,
          )
          annotations = _read_annotations_edf(
              tal_data[0],
              ch_names=info["ch_names"],
              encoding=encoding,
          )
          self.set_annotations(annotations, on_missing="warn")
  
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 1 to create a new RawEDF object from inherited base classes: BaseRaw with example: obj = RawEDF(input_fname, eog, misc, stim_channel, exclude, infer_types, preload, include, units, encoding)