def METHOD_NAME(
    start_date, end_date, timetables, expected, importer
):
    activate("Europe/Helsinki")
    # Convert ISO datetimes from expected to SubEventTimeRange objects
    expected_subtime_ranges = [
        SubEventTimeRange(*(datetime.datetime.fromisoformat(dt_str) for dt_str in d))
        for d in expected
    ]
    # Convert ISO dates to datetime.date objects
    start_date = datetime.date.fromisoformat(start_date)
    end_date = datetime.date.fromisoformat(end_date)
    result = importer.build_sub_event_time_ranges(start_date, end_date, timetables)
    assert len(result) == len(expected_subtime_ranges)
    assert result == expected_subtime_ranges