docstr: Tests batching of four splines.
docstr_tok: ["Tests","batching","of","four","splines","."]
code: def test_spline_batch(self, optimize_for_tpu):
      """Tests batching of four splines."""
      for dtype in (np.float32, np.float64):
          x_data = np.linspace(-11, 12, 24)
          x_data = np.reshape(x_data, [2, 2, 6])
          y_data = 1.0 / (1.0 + x_data * x_data)
          search_args = np.array(
              [[[-10.5, -5.0], [-4.5, 1]], [[1.5, 2.0], [7.5, 12.0]]]
          )
  
          spline = tff.math.interpolation.cubic.build_spline(
              x_data, y_data, dtype=dtype
          )
          result = tff.math.interpolation.cubic.interpolate(
              search_args,
              spline,
              optimize_for_tpu=optimize_for_tpu,
              dtype=dtype,
          )
  
          expected = np.array(
              [
                  [[0.00900778, 0.02702703], [0.04705774, 1.0]],
                  [[0.33135411, 0.2], [0.01756963, 0.00689655]],
              ],
              dtype=dtype,
          )
          self.assertEqual(result.dtype.as_numpy_dtype, dtype)
          result = self.evaluate(result)
          np.testing.assert_almost_equal(expected, result)
  
imports: from absl.testing import parameterized
  import numpy
  import tensorflow.compat.v2
  import tensorflow_probability
  import tf_quant_finance
  from tensorflow.python.framework import test_util
  from tf_quant_finance.math.interpolation import cubic
label_desc: Use image node_id 6 for calling the CubicInterpolationTest obj's underlying member method code with example usage: obj.test_spline_batch(optimize_for_tpu) without return types