def get_part_of_day(hour, sunrise_hour, sunset_hour):
    """Gets part of day from hour."""
    return (
        "morning"
        if sunrise_hour <= hour <= 11
        else "afternoon"
        if 12 <= hour <= sunset_hour
        else "evening"
        if sunset_hour + 1 <= hour <= 22
        else "night"
    )