def _insert_journeys_into_db_no_route(self, stop_profiles, target_stop=None):<EOL>
print("<STR_LIT>")<EOL>journey_id = <NUM_LIT:1><EOL>journey_list = []<EOL>tot = len(stop_profiles)<EOL>for i, (origin_stop, labels) in enumerate(stop_profiles.items(), start=<NUM_LIT:1>):<EOL><INDENT>for label in labels:<EOL><INDENT>assert (isinstance(label, LabelTimeWithBoardingsCount))<EOL>if self.multitarget_routing:<EOL><INDENT>target_stop = None<EOL><DEDENT>else:<EOL><INDENT>target_stop = int(target_stop)<EOL><DEDENT>values = [int(journey_id),<EOL>int(origin_stop),<EOL>target_stop,<EOL>int(label.departure_time),<EOL>int(label.arrival_time_target),<EOL>int(label.n_boardings)]<EOL>journey_list.append(values)<EOL>journey_id += <NUM_LIT:1><EOL><DEDENT><DEDENT>print("<STR_LIT>")<EOL>insert_journeys_stmt = '''<STR_LIT>''' % ("<STR_LIT:U+002CU+0020>".join(["<STR_LIT:?>" for x in range(<NUM_LIT:6>)]))<EOL>self._executemany_exclusive(insert_journeys_stmt, journey_list)<EOL>self.conn.commit()<EOL>
con.isolation_level = 'EXCLUSIVE'
con.execute('BEGIN EXCLUSIVE')
#exclusive access starts here. Nothing else can r/w the db, do your magic here.
con.commit()