code: def testPrecomputedWithMasking(self):
      num_tasks = 2
      amplitude = np.array([1.0, 2.0, 3.0, 4.0], np.float64)
      length_scale = np.array([[0.1], [0.2], [0.3]], np.float64)
      observation_noise_variance = np.array(
          [[1e-2], [1e-4], [1e-6]], np.float64
      )
  
      rng = test_util.test_np_rng()
      # [4, 3, num_tasks]
      observations_is_missing = np.array(
          [
              [[True, False], [False, True], [True, False]],
              [[False, True], [False, True], [False, True]],
              [[False, False], [False, True], [True, False]],
              [[True, False], [False, True], [False, False]],
          ]
      )
      observations = (
          np.linspace(-20.0, 20.0, 3 * num_tasks)
          .reshape(3, num_tasks)
          .astype(np.float64)
      )
      observations = tf.where(
          ~observations_is_missing, observations, np.nan
      )
  
      index_points = (
          np.linspace(1.0, 4.0, 25).reshape(5, 5).astype(np.float64)
      )
  
      observation_index_points = rng.uniform(
          -1.0, 1.0, (3, 1, 3, 5)
      ).astype(np.float64)
  
      kernel = exponentiated_quadratic.ExponentiatedQuadratic(
          amplitude, length_scale
      )
      task_kernel_matrix = np.array(
          [[6.0, 2.0], [2.0, 7.0]], dtype=np.float64
      )
      task_kernel_matrix_linop = tf.linalg.LinearOperatorFullMatrix(
          task_kernel_matrix
      )
      multi_task_kernel = multitask_kernel.Separable(
          num_tasks=num_tasks,
          task_kernel_matrix_linop=task_kernel_matrix_linop,
          base_kernel=kernel,
      )
      mtgprm = mtgprm_lib.MultiTaskGaussianProcessRegressionModel.precompute_regression_model(
          kernel=multi_task_kernel,
          index_points=index_points,
          observation_index_points=observation_index_points,
          observations=observations,
          observations_is_missing=observations_is_missing,
          observation_noise_variance=observation_noise_variance,
          validate_args=True,
      )
  
      mock_cholesky_fn = mock.Mock(return_value=None)
      rebuilt_mtgprm = mtgprm_lib.MultiTaskGaussianProcessRegressionModel.precompute_regression_model(
          kernel=multi_task_kernel,
          index_points=index_points,
          observation_index_points=observation_index_points,
          observations=observations,
          observation_noise_variance=observation_noise_variance,
          _precomputed_divisor_matrix_cholesky=mtgprm._precomputed_divisor_matrix_cholesky,
          _precomputed_solve_on_observation=mtgprm._precomputed_solve_on_observation,
          cholesky_fn=mock_cholesky_fn,
          validate_args=True,
      )
      mock_cholesky_fn.assert_not_called()
  
      rebuilt_mtgprm = rebuilt_mtgprm.copy(cholesky_fn=None)
      self.assertAllNotNan(mtgprm.mean())
      self.assertAllNotNan(mtgprm.variance())
      self.assertAllClose(
          self.evaluate(mtgprm.variance()),
          self.evaluate(rebuilt_mtgprm.variance()),
      )
      self.assertAllClose(
          self.evaluate(mtgprm.mean()),
          self.evaluate(rebuilt_mtgprm.mean()),
      )
  
imports: from unittest import mock
  from absl.testing import parameterized
  import numpy
  import tensorflow.compat.v2
  from tensorflow_probability.python.distributions import gaussian_process_regression_model
  from tensorflow_probability.python.distributions import uniform
  from tensorflow_probability.python.experimental.distributions import multitask_gaussian_process_regression_model
  from tensorflow_probability.python.experimental.psd_kernels import multitask_kernel
  from tensorflow_probability.python.internal import samplers
  from tensorflow_probability.python.internal import test_util
  from tensorflow_probability.python.math.psd_kernels import exponentiated_quadratic
  from tensorflow_probability.python.math.psd_kernels.internal import test_util
label_desc: Use image node_id 11 for calling the MultiTaskGaussianProcessRegressionModelTest obj's underlying member method code with example usage: obj.testPrecomputedWithMasking() without return types