code: def _GetTripIndex(self, schedule=None):
      
      trip_index = []
      for trip, sequence in self._GetTripSequence(schedule):
        for index, st in enumerate(trip.GetStopTimes()):
          if st.stop_sequence == sequence:
            trip_index.append((trip, index))
            break
        else:
          raise RuntimeError("stop_sequence %d not found in trip_id %s" %
                             sequence, trip.trip_id)
      return trip_index
docs: Return a list of (trip, index).
  
      trip: a Trip object
      index: an offset in trip.GetStopTimes()