code: def scan_sequence(self, frame, direction):
          
          orf_start = None
          for c, index in self.codons(frame):
              if (c not in self.stop and (c in self.start or not self.start)
                  and orf_start is None):
                  orf_start = index
              elif c in self.stop and orf_start is not None:
                  self._update_longest(orf_start, index + 3, direction, frame)
                  orf_start = None
  
          if orf_start is not None:
              self._update_longest(orf_start, index + 3, direction, frame)
docs: Search in one reading frame