def ensure_utc(dt: Optional[datetime]) -> Optional[datetime]:
    """Ensure a datetime is UTC timezone-aware.

    Args:
        dt: The datetime to ensure is UTC timezone-aware

    Returns:
        The datetime with UTC timezone, or None if input was None
    """
    if dt is None:
        return None
    if dt.tzinfo is None:
        return dt.replace(tzinfo=timezone.utc)
    return dt
Ensure a datetime is UTC timezone-aware.

    Args:
        dt: The datetime to ensure is UTC timezone-aware

    Returns:
        The datetime with UTC timezone, or None if input was None
    
backend/airweave/platform/scheduler.py