from typing import Optional


def get_schedule_url(base_url: str, day: Optional[str]) -> str:
    """Creates the URL for the schedule endpoint."""
    base_schedule_url = f"{base_url}/schedule"
    return base_schedule_url if day is None else f"{base_schedule_url}/{day.lower()}"