def entry_type_filter(entrystream, entryclass):
for entry in entrystream:<EOL><INDENT>if isinstance(entry, entryclass):<EOL><INDENT>yield entry<EOL><DEDENT><DEDENT>
Generic entry filter.

:param entrystream: a stream of entries
:param entryclass: specify the type of entry upon which to filter