code: def find_eog_events(
      raw,
      event_id=998,
      l_freq=1,
      h_freq=10,
      filter_length="10s",
      ch_name=None,
      tstart=0,
      reject_by_annotation=False,
      thresh=None,
      verbose=None,
  ):
      """Locate EOG artifacts.
  
      .. note:: To control true-positive and true-negative detection rates, you
                may adjust the ``thresh`` parameter.
  
      Parameters
      ----------
      raw : instance of Raw
          The raw data.
      event_id : int
          The index to assign to found events.
      l_freq : float
          Low cut-off frequency to apply to the EOG channel in Hz.
      h_freq : float
          High cut-off frequency to apply to the EOG channel in Hz.
      filter_length : str | int | None
          Number of taps to use for filtering.
      %(ch_name_eog)s
      tstart : float
          Start detection after tstart seconds.
      reject_by_annotation : bool
          Whether to omit data that is annotated as bad.
      thresh : float | None
          Threshold to trigger the detection of an EOG event. This controls the
          thresholding of the underlying peak-finding algorithm. Larger values
          mean that fewer peaks (i.e., fewer EOG events) will be detected.
          If ``None``, use the default of ``(max(eog) - min(eog)) / 4``,
          with ``eog`` being the filtered EOG signal.
      %(verbose)s
  
      Returns
      -------
      eog_events : array
          Events.
  
      See Also
      --------
      create_eog_epochs
      compute_proj_eog
      """
      # Getting EOG Channel
      eog_inds = _get_eog_channel_index(ch_name, raw)
      eog_names = np.array(raw.ch_names)[eog_inds]  # for logging
      logger.info(
          "EOG channel index for this subject is: %s" % eog_inds
      )
  
      # Reject bad segments.
      reject_by_annotation = "omit" if reject_by_annotation else None
      eog, times = raw.get_data(
          picks=eog_inds,
          reject_by_annotation=reject_by_annotation,
          return_times=True,
      )
      times = times * raw.info["sfreq"] + raw.first_samp
  
      eog_events = _find_eog_events(
          eog,
          ch_names=eog_names,
          event_id=event_id,
          l_freq=l_freq,
          h_freq=h_freq,
          sampling_rate=raw.info["sfreq"],
          first_samp=raw.first_samp,
          filter_length=filter_length,
          tstart=tstart,
          thresh=thresh,
          verbose=verbose,
      )
      # Map times to corresponding samples.
      eog_events[:, 0] = np.round(
          times[eog_events[:, 0] - raw.first_samp]
      ).astype(int)
      return eog_events
  
file_path: mne-python/mne/preprocessing/eog.py
imports: import numpy
  from .._fiff.pick import pick_channels, pick_types
  from ..epochs import Epochs
  from ..filter import filter_data
  from ..utils import _pl, _validate_type, logger, verbose
  from ._peak_finder import peak_finder
label_desc: Use image node_id 1 for calling a global function with example usage: find_eog_events(raw, event_id, l_freq, h_freq, filter_length, ch_name, tstart, reject_by_annotation, thresh, verbose) and returns: eog_events