code: def filter_record(self, record):
          
          nloc = record.seq.find('N')
          if nloc == -1:
              return record
          elif self.action == 'truncate':
              return record[:nloc]
          elif self.action == 'drop':
              raise FailedFilter()
          else:
              assert False
docs: Filter a record, truncating or dropping at an 'N'