code: def _reject_short_segments(arr, min_duration_samples):
      """Check if flat or peak segments are longer than the minimum duration."""
      assert arr.dtype == np.dtype(bool) and arr.ndim == 2
      for k, ch in enumerate(arr):
          onsets, offsets = _mask_to_onsets_offsets(ch)
          _mark_inner(arr[k], onsets, offsets, min_duration_samples)
      return arr
  
file_path: mne-python/mne/preprocessing/_annotate_amplitude.py
imports: import numpy
  from .._fiff.pick import _picks_by_type, _picks_to_idx
  from ..annotations import Annotations, _adjust_onset_meas_date, _annotations_starts_stops
  from ..fixes import jit
  from ..io import BaseRaw
  from ..utils import _mask_to_onsets_offsets, _validate_type, logger, verbose
label_desc: Use image node_id 5 for calling a global function with example usage: _reject_short_segments(arr, min_duration_samples) and returns: arr