code: def test_set_state_cint_to_float(echo):
      w = NumberWidget()
  
      # Set CInt to float
      w.set_state(dict(ci=5.6))
      # Ensure an update message gets produced
      assert len(w.comm.messages) == (2 if echo else 1)
      msg = w.comm.messages[-1]
      data = msg[1]["data"]
      assert data["method"] == "update"
      assert data["state"] == {"ci": 5}
  
imports: import pytest
  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 14 for calling a global function with example usage: test_set_state_cint_to_float(echo) without return types