parameters: (
      requested_orig_obj,
      requested_dest_obj,
      pt_journey_pool,
      has_valid_direct_paths,
      orig_places_free_access,
      dest_places_free_acces,
      orig_fallback_durations_pool,
      dest_fallback_durations_pool,
  )
return_statement: return res
docstring: block until pt_journeys are computed and attach crow-flies as fallback to all the journeys
  
      :return: A list of pt journeys with crowfly as a fallback
docstring_summary: block until pt_journeys are computed and attach crow-flies as fallback to all the journeys
docstring_tokens: block until pt_journeys are computed and attach crow - flies as fallback to all the journeys
function: def wait_and_build_crowflies(
      requested_orig_obj,
      requested_dest_obj,
      pt_journey_pool,
      has_valid_direct_paths,
      orig_places_free_access,
      dest_places_free_acces,
      orig_fallback_durations_pool,
      dest_fallback_durations_pool,
  ):
      """
      block until pt_journeys are computed and attach crow-flies as fallback to all the journeys
  
      :return: A list of pt journeys with crowfly as a fallback
      """
      logger = logging.getLogger(__name__)
      res = []
      for (dep_mode, arr_mode, future_pt_journey) in pt_journey_pool:
          logger.debug("waiting for pt journey starts with %s and ends with %s", dep_mode, arr_mode)
          pt_journeys = wait_and_get_pt_journeys(future_pt_journey, has_valid_direct_paths)
  
          if pt_journeys and pt_journeys.journeys:
              orig_fallback_durations = orig_fallback_durations_pool.get_best_fallback_durations(dep_mode)
              origin_crowfly = {
                  "entry_point": requested_orig_obj,
                  "mode": dep_mode,
                  "places_free_access": orig_places_free_access.wait_and_get(),
                  "fallback_durations": orig_fallback_durations,
                  "fallback_type": StreetNetworkPathType.BEGINNING_FALLBACK,
              }
  
              dest_fallback_durations = dest_fallback_durations_pool.get_best_fallback_durations(arr_mode)
              dest_crowfly = {
                  "entry_point": requested_dest_obj,
                  "mode": arr_mode,
                  "places_free_access": dest_places_free_acces.wait_and_get(),
                  "fallback_durations": dest_fallback_durations,
                  "fallback_type": StreetNetworkPathType.ENDING_FALLBACK,
              }
  
              _build_crowflies(pt_journeys, origin_crowfly, dest_crowfly)
  
              res.append(Pt_element(dep_mode, arr_mode, pt_journeys))
  
      return res
function_tokens: def wait_and_build_crowflies ( requested_orig_obj , requested_dest_obj , pt_journey_pool , has_valid_direct_paths , orig_places_free_access , dest_places_free_acces , orig_fallback_durations_pool , dest_fallback_durations_pool , ) : logger = logging . getLogger ( __name__ ) res = [ ] for ( dep_mode , arr_mode , future_pt_journey ) in pt_journey_pool : logger . debug ( "waiting for pt journey starts with %s and ends with %s" , dep_mode , arr_mode ) pt_journeys = wait_and_get_pt_journeys ( future_pt_journey , has_valid_direct_paths ) if pt_journeys and pt_journeys . journeys : orig_fallback_durations = orig_fallback_durations_pool . get_best_fallback_durations ( dep_mode ) origin_crowfly = { "entry_point" : requested_orig_obj , "mode" : dep_mode , "places_free_access" : orig_places_free_access . wait_and_get ( ) , "fallback_durations" : orig_fallback_durations , "fallback_type" : StreetNetworkPathType . BEGINNING_FALLBACK , } dest_fallback_durations = dest_fallback_durations_pool . get_best_fallback_durations ( arr_mode ) dest_crowfly = { "entry_point" : requested_dest_obj , "mode" : arr_mode , "places_free_access" : dest_places_free_acces . wait_and_get ( ) , "fallback_durations" : dest_fallback_durations , "fallback_type" : StreetNetworkPathType . ENDING_FALLBACK , } _build_crowflies ( pt_journeys , origin_crowfly , dest_crowfly ) res . append ( Pt_element ( dep_mode , arr_mode , pt_journeys ) ) return res