code: def test_set_state_numbers_int(echo):
      # JS does not differentiate between float/int.
      # Instead, it formats exact floats as ints in JSON (1.0 -> '1').
  
      w = NumberWidget()
      # Set everything with ints
      w.set_state(
          dict(
              f=1,
              cf=2,
              i=3,
              ci=4,
          )
      )
      # Ensure one update message gets produced
      assert len(w.comm.messages) == (1 if echo else 0)
  
imports: import pytest
  from unittest import mock
  from traitlets import Bool, Tuple, List, Instance, CFloat, CInt, Float, Int, TraitError, observe
  from .utils import setup, teardown
  import ipywidgets
  from ipywidgets import Widget
label_desc: Use image node_id 11 for calling a global function with example usage: test_set_state_numbers_int(echo) without return types