docs: def coerce_dt_awareness(date_or_datetime, tz=None, t=None):
      """
      Coerce the given `datetime` or `date` object into a timezone-aware or
      timezone-naive `datetime` result, depending on which is appropriate for
      the project's settings.
      """
      if isinstance(date_or_datetime, datetime):
          dt = date_or_datetime
      else:
          dt = datetime.combine(date_or_datetime, t or time.min)
      is_project_tz_aware = settings.USE_TZ
      if is_project_tz_aware:
          return coerce_aware(dt, tz)
      elif not is_project_tz_aware:
          return coerce_naive(dt, tz)
      # No changes necessary
      return dt