code: def test_control():
      comm = DummyComm()
      Widget.close_all()
      w = SimpleWidget()
      Widget.handle_control_comm_opened(
          comm, dict(metadata={"version": __control_protocol_version__})
      )
      Widget._handle_control_comm_msg(
          dict(content=dict(data={"method": "request_states"}))
      )
      assert comm.messages
  
file_path: catboost/contrib/python/ipywidgets/py2/ipywidgets/widgets/tests/test_send_state.py
imports: from traitlets import Bool, Tuple, List
  from .utils import setup, teardown, DummyComm
  from ipywidgets.widgets.widget import Widget
  from ipywidgets._version import __control_protocol_version__
label_desc: Use image node_id 3 for calling a global function with example usage: test_control() without return types