'Returns next GFFFeature.'

def __next__(self):

    def handle_parse_error(e):
        '    Actions    to    take    when    ParseError    found.    '
        if self.outstream:
            if (self.print_delegate and hasattr(self.print_delegate, '__call__')):
                self.print_delegate(self.outstream, e, self)
        self.skipped += 1
        if (self.skipped < 10):
            self.skipped_lines.append((self.linenum, self.current_line, str(e)))
    raw_size = self.seed_interval_line_len
    if (not self.seed_interval):
        while (not self.seed_interval):
            try:
                self.seed_interval = GenomicIntervalReader.next(self)
            except ParseError as e:
                handle_parse_error(e)
            raw_size += len(self.current_line)
    if isinstance(self.seed_interval, (Header, Comment)):
        return_val = self.seed_interval
        return_val.raw_size = len(self.current_line)
        self.seed_interval = None
        self.seed_interval_line_len = 0
        return return_val
    feature_group = self.seed_interval.attributes.get('group', None)
    feature_id = self.seed_interval.attributes.get('ID', None)
    feature_transcript_id = self.seed_interval.attributes.get('transcript_id', None)
    feature_intervals = []
    feature_intervals.append(self.seed_interval)
    while True:
        try:
            interval = GenomicIntervalReader.next(self)
            raw_size += len(self.current_line)
        except StopIteration as e:
            interval = None
            raw_size += len(self.current_line)
            break
        except ParseError as e:
            handle_parse_error(e)
            raw_size += len(self.current_line)
            continue
        if isinstance(interval, Comment):
            continue
        part_of = False
        group = interval.attributes.get('group', None)
        if (group and (feature_group == group)):
            part_of = True
        parent_id = interval.attributes.get('Parent', None)
        cur_id = interval.attributes.get('ID', None)
        if ((cur_id and (cur_id == feature_id)) or (parent_id and (parent_id == feature_id))):
            part_of = True
        transcript_id = interval.attributes.get('transcript_id', None)
        if (transcript_id and (transcript_id == feature_transcript_id)):
            part_of = True
        if (not part_of):
            raw_size -= len(self.current_line)
            break
        feature_intervals.append(interval)
    self.seed_interval = interval
    self.seed_interval_line_len = len(self.current_line)
    feature = GFFFeature(self, self.chrom_col, self.feature_col, self.start_col, self.end_col, self.strand_col, self.score_col, self.default_strand, fix_strand=self.fix_strand, intervals=feature_intervals, raw_size=raw_size)
    if self.convert_to_bed_coord:
        convert_gff_coords_to_bed(feature)
    return feature
