code: def test_set_state_int_to_float(echo):
      w = NumberWidget()
  
      # Set Int to float
      with pytest.raises(TraitError):
          w.set_state(dict(i=3.5))
  
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 16 for calling a global function with example usage: test_set_state_int_to_float(echo) without return types