def find_route(trip, route_data):
    """
    

    Parameters
    ----------
    trip : STRING
        Trip id.
    route_data : dictionary
        Dictionary file with routes information about the routes.

    Returns
    -------
    route : STRING
        Route name on which this trip is.

    """
    # Try to find the route name for the given trip
    route = None
    for route_cand in route_data.keys():
        if trip in route_data[route_cand]['GM_trips']:
            route = route_cand
            return route
        
   # If route not found, set to unkown
    if not route:
       route= 'unknown'
       print('Route info not found for this trip in json file! Setting to unknown..')
       return route