code: def test_scalar_to_support():
      """unit test"""
      scalar = torch.scalar_tensor(3.7)
  
      # single scalar value
      support = scalar_to_support(scalar=scalar, support_range=(0, 10))
      support = support.cpu().numpy()
      assert support.shape == (11,)
      assert np.allclose(support[3], 0.3)
      assert np.allclose(support[4], 0.7)
  
      support = scalar_to_support(
          scalar=scalar, support_range=(-10, 10)
      )
      support = support.cpu().numpy()
      assert support.shape == (21,)
      assert np.allclose(support[13], 0.3)
      assert np.allclose(support[14], 0.7)
  
      # vector of scalars
      scalar = torch.from_numpy(
          np.full(shape=(10,), fill_value=3.7, dtype=np.float32)
      )
      support = scalar_to_support(
          scalar=scalar, support_range=(-10, 10)
      )
      assert support.shape == (10, 21)
      assert np.allclose(support[:, 13], 0.3)
      assert np.allclose(support[:, 14], 0.7)
  
file_path: maze/maze/test/train/common/test_value_transform.py
imports: import io
  from contextlib import redirect_stdout
  import numpy
  import torch
  from maze.train.trainers.common.value_transform import support_to_scalar, scalar_to_support, ReduceScaleValueTransform
label_desc: Use image node_id 3 for calling a global function with example usage: test_scalar_to_support() without return types