code: def target_times_as_dates(
      base_date: datetime.datetime,
      lower: datetime.datetime | datetime.time | None,
      upper: datetime.datetime | datetime.time | None,
  ):
      """Ensure upper and lower time targets are datetimes by combining them with base_date."""
      if isinstance(lower, datetime.datetime) and isinstance(
          upper, datetime.datetime
      ):
          return lower, upper
  
      if lower is not None and isinstance(lower, datetime.time):
          lower = datetime.datetime.combine(base_date, lower)
      if upper is not None and isinstance(upper, datetime.time):
          upper = datetime.datetime.combine(base_date, upper)
  
      if lower is None or upper is None:
          return lower, upper
  
      if upper < lower:
          upper += datetime.timedelta(days=1)
      return lower, upper
  
file_path: airflow/airflow/operators/datetime.py
imports: from __future__ import annotations
  import datetime
  import warnings
  from typing import TYPE_CHECKING, Iterable
  from airflow.exceptions import AirflowException, RemovedInAirflow3Warning
  from airflow.operators.branch import BaseBranchOperator
  from airflow.utils import timezone
label_desc: Use image node_id 1 for calling a global function with example usage: target_times_as_dates(base_date, lower, upper) and returns: lower,  upper, lower,  upper, lower,  upper