parameters: (self)
docstring: Assigns a shape to each non-transfer edge.
docstring_summary: Assigns a shape to each non-transfer edge.
docstring_tokens: Assigns a shape to each non - transfer edge .
function: def __assign_shapes_to_edges(self):
          """Assigns a shape to each non-transfer edge."""
          for edge in self.edges:
              if not edge['transfer']:
                  stop1 = self.stops[edge['stop1_id']]
                  stop2 = self.stops[edge['stop2_id']]
                  id1 = stop1.get('transfer_id', stop1['id'])
                  id2 = stop2.get('transfer_id', stop2['id'])
                  seg = tuple(sorted([id1, id2]))
                  if seg in self.segments:
                      edge['shape_ids'].append({'stop1_id': seg[0], 'stop2_id': seg[1]})
function_tokens: def __assign_shapes_to_edges ( self ) : for edge in self . edges : if not edge [ 'transfer' ] : stop1 = self . stops [ edge [ 'stop1_id' ] ] stop2 = self . stops [ edge [ 'stop2_id' ] ] id1 = stop1 . get ( 'transfer_id' , stop1 [ 'id' ] ) id2 = stop2 . get ( 'transfer_id' , stop2 [ 'id' ] ) seg = tuple ( sorted ( [ id1 , id2 ] ) ) if seg in self . segments : edge [ 'shape_ids' ] . append ( { 'stop1_id' : seg [ 0 ] , 'stop2_id' : seg [ 1 ] } )