code: def test_get_label_weights(self):
      vocab = {"foo": 0, "bar": 1}
      weights = {"foo": 3.2, "foobar": 2.1}
      weights_tensor = label.get_label_weights(vocab, weights)
      np.testing.assert_array_almost_equal(
          np.array([3.2, 1]), weights_tensor.detach().numpy()
      )
  
file_path: pytext/pytext/utils/tests/label_test.py
imports: import unittest
  import numpy
  from pytext.utils import label
label_desc: Use image node_id 1 for calling the LabelUtilTest obj's underlying member method code with example usage: obj.test_get_label_weights() without return types