def __len__(self):
        if self.path is self and self.orientation < 0:
            return len(self._reverse) # GET LENGTH FROM FORWARD SEQUENCE
        # Get the number of results from iter(self).
        d = (self.stop - self.start) / self.step
        if d > 0: # IF stop - start < step, d WILL BE ZERO -- PREVENT THAT!
            return d
        else:
            # Never return 0 length... Bounds checking ensures non-empty ival.
            return 1

    ################################ LETTER GRAPH METHODS: JUST A LINEAR GRAPH
dataset/ETHPy150Open cjlee112/pygr/pygr/sequence.py/SeqPath.__len__/original