code: def test_construct_vol_covar_and_vol_callables(self):
      dtype = np.float64
      vol_matrix = np.array(
          [[1.0, 0.21, -0.33], [0.61, 1.5, 1.77], [-0.3, 1.19, -0.55]]
      ).astype(dtype)
      covar_matrix = np.matmul(vol_matrix, vol_matrix.transpose())
      vol_fn = lambda time: bm_utils.outer_multiply(time, vol_matrix)
  
      def tc_fn(t1, t2):
          return bm_utils.outer_multiply(
              (t2**2 - t1**2) / 2, covar_matrix
          )
  
      times = np.array([[0.12, 0.44], [0.48, 1.698]]).astype(dtype)
      actual_vol_fn, actual_tc_fn = bm_utils.construct_vol_data(
          vol_fn, tc_fn, 3, dtype
      )
      actual_vols = self.evaluate(actual_vol_fn(times))
      np.testing.assert_array_equal(actual_vols.shape, [2, 2, 3, 3])
      np.testing.assert_allclose(
          actual_vols, self.evaluate(vol_fn(times))
      )
      times2 = times + np.array([[0.12, 0.34], [0.56, 0.78]]).astype(
          dtype
      )
      actual_tc = self.evaluate(actual_tc_fn(times, times2))
      np.testing.assert_array_equal(actual_tc.shape, [2, 2, 3, 3])
      np.testing.assert_allclose(
          actual_tc, self.evaluate(actual_tc_fn(times, times2))
      )
  
imports: import numpy
  import tensorflow.compat.v2
  from tensorflow.python.framework import test_util
  from tf_quant_finance.models.legacy import brownian_motion_utils
label_desc: Use image node_id 8 for calling the BrownianMotionUtilsTest obj's underlying member method code with example usage: obj.test_construct_vol_covar_and_vol_callables() and returns: bm_utils