code: def _check_min_duration(min_duration, raw_duration):
      """Check that min_duration is a valid duration and converts to float."""
      _validate_type(min_duration, "numeric", "min_duration")
      min_duration = float(min_duration)
      if min_duration < 0:
          raise ValueError(
              "Argument 'min_duration' should define a positive duration in "
              f"seconds. Provided: '{min_duration}' seconds."
          )
      if min_duration >= raw_duration:
          raise ValueError(
              "Argument 'min_duration' should define a positive duration in "
              f"seconds shorter than the raw duration ({raw_duration} seconds). "
              f"Provided: '{min_duration}' seconds."
          )
      return min_duration
  
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 4 for calling a global function with example usage: _check_min_duration(min_duration, raw_duration) and returns: min_duration