code: def check_widgets(container, **to_check):
      """Check that widgets are created as expected"""
      # build a widget dictionary, so it matches
      widgets = {}
      for w in container.children:
          if not isinstance(w, Output):
              widgets[w.description] = w
  
      for key, d in to_check.items():
          assert key in widgets
          check_widget(widgets[key], **d)
  
imports: from __future__ import print_function
  import os
  from collections import OrderedDict
  import pytest
  import ipywidgets
  from traitlets import TraitError
  from ipywidgets import interact, interact_manual, interactive, interaction, Output
  from ipython_genutils.py3compat import annotate
  from .utils import setup, teardown
label_desc: Use image node_id 5 for calling a global function with example usage: check_widgets(container) without return types