def write(self):
for entry in self._instream:<EOL><INDENT>if isinstance(entry, Feature):<EOL><INDENT>for feature in entry:<EOL><INDENT>if feature.num_children > <NUM_LIT:0> or feature.is_multi:<EOL><INDENT>if feature.is_multi and feature != feature.multi_rep:<EOL><INDENT>continue<EOL><DEDENT>self.feature_counts[feature.type] += <NUM_LIT:1><EOL>fid = '<STR_LIT>'.format(feature.type,<EOL>self.feature_counts[feature.type])<EOL>feature.add_attribute('<STR_LIT>', fid)<EOL><DEDENT>else:<EOL><INDENT>feature.drop_attribute('<STR_LIT>')<EOL><DEDENT><DEDENT><DEDENT>if isinstance(entry, Sequence) and not self._seq_written:<EOL><INDENT>print('<STR_LIT>', file=self.outfile)<EOL>self._seq_written = True<EOL><DEDENT>print(repr(entry), file=self.outfile)<EOL><DEDENT>
Pull features from the instream and write them to the output.