code: def test_negative_weights(self):
      with self.assertRaises(InvalidWeightException):
          WeightedHeatmap(locations=self.locations, weights=[1.0, -2.0])
  
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 3 for calling the TestWeightedHeatmap obj's underlying member method code with example usage: obj.test_negative_weights() without return types