code: def _check_null_duration(events):
      """Warn if there are events with null duration."""
      conditions_with_null_duration = events["trial_type"][
          events["duration"] == 0
      ].unique()
      if len(conditions_with_null_duration) > 0:
          warnings.warn(
              "The following conditions contain events with null duration:\n"
              f"{', '.join(conditions_with_null_duration)}."
          )
  
file_path: nilearn/nilearn/glm/first_level/experimental_paradigm.py
imports: import warnings
  import pandas
  from pandas.api.types import is_numeric_dtype
label_desc: Use image node_id 4 for calling a global function with example usage: _check_null_duration(events) without return types