def same_departure_time(path, route, pathes, routes) -> bool:
    """ Check that a path and a list of candidate paths have the same departure time """
    dep_time = route[path[0]][path[1]]["dep_time"]
    new_dep_time = routes[0][pathes[0][0]][pathes[0][1]]["dep_time"]
    return dep_time == new_dep_time