code: def infer_time_unit(time_seconds_arr: Collection[float]) -> TimeUnit:
      """Determine the most appropriate time unit for given durations (in seconds).
  
      e.g. 5400 seconds => 'minutes', 36000 seconds => 'hours'
      """
      if not time_seconds_arr:
          return "hours"
      max_time_seconds = max(time_seconds_arr)
      if max_time_seconds <= 60 * 2:
          return "seconds"
      elif max_time_seconds <= 60 * 60 * 2:
          return "minutes"
      elif max_time_seconds <= 24 * 60 * 60 * 2:
          return "hours"
      else:
          return "days"
  
file_path: airflow/airflow/utils/dates.py
imports: from __future__ import annotations
  import warnings
  from datetime import datetime, timedelta
  from typing import Collection
  from croniter import croniter
  from dateutil.relativedelta import relativedelta
  from airflow.exceptions import RemovedInAirflow3Warning
  from airflow.typing_compat import Literal
  from airflow.utils import timezone
label_desc: Use image node_id 3 for calling a global function with example usage: infer_time_unit(time_seconds_arr) and returns: str, str, str, str, str