def iter_widgets(self, file=None, place=None):
for filter, dynamic, cwidget in self._widgets:<EOL><INDENT>try:<EOL><INDENT>if file and filter and not filter(file):<EOL><INDENT>continue<EOL><DEDENT><DEDENT>except BaseException as e:<EOL><INDENT>warnings.warn(<EOL>'<STR_LIT>' % e,<EOL>RuntimeWarning<EOL>)<EOL>continue<EOL><DEDENT>if place and place != cwidget.place:<EOL><INDENT>continue<EOL><DEDENT>if file and dynamic:<EOL><INDENT>cwidget = self._resolve_widget(file, cwidget)<EOL><DEDENT>yield cwidget<EOL><DEDENT>
Iterate registered widgets, optionally matching given criteria.

:param file: optional file object will be passed to widgets' filter
             functions.
:type file: browsepy.file.Node or None
:param place: optional template place hint.
:type place: str
:yields: widget instances
:ytype: object