def get_shape_distance_between_stops(self, trip_I, from_stop_seq, to_stop_seq):
query_template = "<STR_LIT>"<EOL>stop_seqs = [from_stop_seq, to_stop_seq]<EOL>shape_breaks = []<EOL>for seq in stop_seqs:<EOL><INDENT>q = query_template.format(seq=seq, trip_I=trip_I)<EOL>shape_breaks.append(self.conn.execute(q).fetchone())<EOL><DEDENT>query_template = "<STR_LIT>""<STR_LIT>""<STR_LIT>"<EOL>distance_query = query_template.format(trip_I=trip_I, from_stop_seq=from_stop_seq, to_stop_seq=to_stop_seq)<EOL>return self.conn.execute(distance_query).fetchone()[<NUM_LIT:0>]<EOL>
Get the distance along a shape between stops

Parameters
----------
trip_I : int
    trip_ID along which we travel
from_stop_seq : int
    the sequence number of the 'origin' stop
to_stop_seq : int
    the sequence number of the 'destination' stop

Returns
-------
distance : float, None
    If the shape calculation succeeded, return a float, otherwise return None
    (i.e. in the case where the shapes table is empty)