code: def test_2d_scalar_valued_no_leading_dims_fill_value_provided(self):
      y_ref = [[0.0, 1.0], [2.0, 3.0]]
  
      # Test x at intermediate grid points, outside points, and NaN.
      y = self.batch_interp_regular_nd_grid_fn(
          x=[
              [-1.0, 0.5],  # Outside the grid.
              [10.0, 0.5],  # Outside the grid.
              [0.5, -0.5],  # Outside the grid.
              [0.5, 3.5],  # Outside the grid.
              [0.0, 0.5],
              [0.5, 0.0],
              [1.0, np.nan],
              [np.nan, 1.0],
              [0.0, 1.0],
          ],
          x_ref_min=[0.0, 0.0],
          x_ref_max=[1.0, 1.0],
          y_ref=y_ref,
          axis=-2,
          fill_value=-42.0,
      )
      self.assertAllClose(
          [-42, -42, -42, -42, 0.5, 1.0, np.nan, np.nan, 1.0],
          self.evaluate(y),
      )
  
imports: import numpy
  from scipy import interpolate
  import tensorflow.compat.v1
  import tensorflow.compat.v2
  from tensorflow_probability.python.internal import dtype_util
  from tensorflow_probability.python.internal import prefer_static
  from tensorflow_probability.python.internal import test_util
  from tensorflow_probability.python.math import gradient
  from tensorflow_probability.python.math import interpolation
label_desc: Use image node_id 2 for calling the BaseBatchInterpNDGridTest obj's underlying member method code with example usage: obj.test_2d_scalar_valued_no_leading_dims_fill_value_provided() without return types