code: def _check_dt_is_sorted(df, dt_col):
      import numpy as np
      import warnings
  
      df = df.copy()
      try:
          res = (
              np.diff(df[dt_col].values.astype(np.float32)) >= 0
          ).all()
          if not res:
              raise RuntimeError(f"{dt_col} must be sorted.")
      except (ValueError, TypeError):
          warnings.warn(f"{dt_col} may not be sorted.", Warning)
  
label_desc: Use image node_id 7 for calling a global function with example usage: _check_dt_is_sorted(df, dt_col) without return types