code: def test_1d_scalar_valued_function(self):
      x_ref_min = np.array([-2.0], dtype=np.float32)
      x_ref_max = np.array([1.3], dtype=np.float32)
      ny = [100]
  
      # Build y_ref.
      x0s = tf.linspace(x_ref_min[0], x_ref_max[0], ny[0])
  
      def func(x0):
          return tf.sin(x0) ** 2
  
      # Shape ny
      y_ref = self.evaluate(func(x0s))
  
      # Shape [10, 1]
      x = tf.random.uniform(
          shape=(10, 1),
          minval=x_ref_min[0],
          maxval=x_ref_max[0],
          seed=test_util.test_seed(),
      )
  
      x = self.evaluate(x)
  
      expected_y = func(x[:, 0])
      actual_y = self.batch_interp_regular_nd_grid_fn(
          x=x,
          x_ref_min=x_ref_min,
          x_ref_max=x_ref_max,
          y_ref=y_ref,
          axis=-1,
      )
  
      self.assertAllClose(
          self.evaluate(expected_y), self.evaluate(actual_y), atol=0.02
      )
  
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 3 for calling the BaseBatchInterpNDGridTest obj's underlying member method code with example usage: obj.test_1d_scalar_valued_function() and returns: unknown