def explode(self):
        """
        Turn every multi- segment entity into single segment entities, in- place
        """
        new_entities = collections.deque()
        for entity in self.entities:
            new_entities.extend(entity.explode())
        self.entities = np.array(new_entities)
def explode ( self ) : new_entities = collections . deque ( ) for entity in self . entities : new_entities . extend ( entity . explode ( ) ) self . entities = np . array ( new_entities )
Turn every multi- segment entity into single segment entities, in- place