code: def test_close_all():
      # create a couple of widgets
      widgets = [Button() for i in range(10)]
  
      assert len(widget._instances) > 0, "expect active widgets"
      assert widget._instances[widgets[0].model_id] is widgets[0]
      # close all the widgets
      Widget.close_all()
  
      assert (
          len(widget._instances) == 0
      ), "active widgets should be cleared"
  
file_path: catboost/contrib/python/ipywidgets/py3/ipywidgets/widgets/tests/test_widget.py
imports: import inspect
  import pytest
  from IPython.core.interactiveshell import InteractiveShell
  from IPython.display import display
  from IPython.utils.capture import capture_output
  from ipywidgets.widgets import widget
  from ipywidgets.widgets.widget import Widget
  from ipywidgets.widgets.widget_button import Button
  import copy
label_desc: Use image node_id 3 for calling a global function with example usage: test_close_all() without return types