code: def test_fill(self):
      for fw in FRAMEWORKS_TO_TEST:
          double_type = DOUBLE_TYPE[fw]
  
          # if un-specified dims should be 1, dtype is not important
          x = TensorSpec("b,h", framework=fw).fill(float(2.0))
  
          # check the shape
          self.assertEqual(x.shape, (1, 1))
          # check the value
          check(x, np.array([[2.0]]))
  
          x = TensorSpec("b,h", b=2, h=3, framework=fw).fill(2.0)
          self.assertEqual(x.shape, (2, 3))
  
          x = TensorSpec(
              "b,h1,h2,h3",
              h1=2,
              h2=3,
              h3=3,
              framework=fw,
              dtype=double_type,
          ).fill(2)
          self.assertEqual(x.shape, (1, 2, 3, 3))
          self.assertEqual(x.dtype, double_type)
  
file_path: ray/rllib/core/models/specs/tests/test_tensor_spec.py
imports: import itertools
  import unittest
  import numpy
  from ray.rllib.utils import try_import_jax, try_import_tf, try_import_torch
  from ray.rllib.utils.test_utils import check
  from ray.rllib.core.models.specs.specs_base import TensorSpec
label_desc: Use image node_id 2 for calling the TestSpecs obj's underlying member method code with example usage: obj.test_fill() without return types