from typing import Optional


def get_season_url(
    base_url: str, year: Optional[int] = None, season: Optional[str] = None
) -> str:
    """Creates the URL for the season endpoint."""
    if year is None or season is None:
        return f"{base_url}/season"
    return f"{base_url}/season/{year}/{season.lower()}"