code: def test_sample_conditional_mixedkernel() -> None:
      q_mu = tf.random.uniform(
          (Data.M, Data.L), dtype=tf.float64
      )  # M x L
      q_sqrt = tf.convert_to_tensor(
          [
              np.tril(
                  tf.random.uniform((Data.M, Data.M), dtype=tf.float64)
              )
              for _ in range(Data.L)
          ]
      )  # L x M x M
  
      Z = Data.X[: Data.M, ...]  # M x D
      N = int(10e5)
      Xs: AnyNDArray = np.ones((N, Data.D), dtype=float_type)
  
      # Path 1: mixed kernel: most efficient route
      W = np.random.randn(Data.P, Data.L)
      mixed_kernel = mk.LinearCoregionalization(
          [SquaredExponential() for _ in range(Data.L)], W
      )
      optimal_inducing_variable = mf.SharedIndependentInducingVariables(
          InducingPoints(Z)
      )
  
      value, mean, var = sample_conditional(
          Xs,
          optimal_inducing_variable,
          mixed_kernel,
          q_mu,
          q_sqrt=q_sqrt,
          white=True,
      )
  
      # Path 2: independent kernels, mixed later
      separate_kernel = mk.SeparateIndependent(
          [SquaredExponential() for _ in range(Data.L)]
      )
      fallback_inducing_variable = (
          mf.SharedIndependentInducingVariables(InducingPoints(Z))
      )
  
      value2, mean2, var2 = sample_conditional(
          Xs,
          fallback_inducing_variable,
          separate_kernel,
          q_mu,
          q_sqrt=q_sqrt,
          white=True,
      )
      value2 = np.matmul(value2, W.T)
      # check if mean and covariance of samples are similar
      np.testing.assert_array_almost_equal(
          np.mean(value, axis=0), np.mean(value2, axis=0), decimal=1
      )
      np.testing.assert_array_almost_equal(
          np.cov(value, rowvar=False),
          np.cov(value2, rowvar=False),
          decimal=1,
      )
  
imports: from typing import Callable, List, Sequence, Tuple, cast
  import numpy
  import pytest
  import scipy
  import tensorflow
  from _pytest.fixtures import SubRequest
  from check_shapes import ShapeChecker, check_shapes
  import gpflow
  import gpflow.inducing_variables.multioutput
  import gpflow.kernels.multioutput
  from gpflow import set_trainable
  from gpflow.base import AnyNDArray, RegressionData
  from gpflow.conditionals import sample_conditional
  from gpflow.conditionals.util import fully_correlated_conditional, fully_correlated_conditional_repeat, independent_interdomain_conditional, sample_mvn
  from gpflow.config import default_float, default_jitter
  from gpflow.inducing_variables import InducingPoints
  from gpflow.kernels import SquaredExponential
  from gpflow.likelihoods import Gaussian
  from gpflow.models import SVGP
label_desc: Use image node_id 8 for calling a global function with example usage: test_sample_conditional_mixedkernel() without return types