code: def test_non_float_weights(self):
      with self.assertRaises(traitlets.TraitError):
          WeightedHeatmap(
              locations=self.locations, weights=["not", "float"]
          )
  
imports: import unittest
  import pytest
  import traitlets
  from ..heatmap import _HeatmapOptionsMixin, heatmap_layer, Heatmap, WeightedHeatmap
  from ..geotraitlets import InvalidPointException, InvalidWeightException
label_desc: Use image node_id 2 for calling the TestWeightedHeatmap obj's underlying member method code with example usage: obj.test_non_float_weights() without return types