parameters: (
        self, vehicles: Iterable["OriginDestinationDemand"])
docstring: Assert that OD demands have valid origin and destination.
docstring_summary: Assert that OD demands have valid origin and destination.
docstring_tokens: Assert that OD demands have valid origin and destination .
function: def check_list_of_od_demand_is_correct(
        self, vehicles: Iterable["OriginDestinationDemand"]):
      """Assert that OD demands have valid origin and destination."""
      for vehicle in vehicles:
        if (vehicle.origin not in self._road_section_to_action or
            vehicle.destination not in self._road_section_to_action):
          raise ValueError(f"Incorrect origin or destination for {vehicle}")
function_tokens: def check_list_of_od_demand_is_correct ( self , vehicles : Iterable [ "OriginDestinationDemand" ] ) : for vehicle in vehicles : if ( vehicle . origin not in self . _road_section_to_action or vehicle . destination not in self . _road_section_to_action ) : raise ValueError ( f"Incorrect origin or destination for {vehicle}" )