code: def _mvnormal_pseudo_antithetic(
      sample_shape,
      mean,
      covariance_matrix=None,
      scale_matrix=None,
      random_type=RandomType.PSEUDO_ANTITHETIC,
      seed=None,
      dtype=None,
  ):
      """Returns normal draws with the antithetic samples."""
      sample_zero_dim = sample_shape[0]
      # For the antithetic sampler `sample_shape` is split evenly between
      # samples and their antithetic counterparts. In order to do the splitting
      # we expect the first dimension of `sample_shape` to be even.
      is_even_dim = tf.compat.v1.debugging.assert_equal(
          sample_zero_dim % 2,
          0,
          message="First dimension of `sample_shape` should be even for "
          "PSEUDO_ANTITHETIC random type",
      )
      with tf.control_dependencies([is_even_dim]):
          antithetic_shape = tf.concat(
              [[sample_zero_dim // 2], sample_shape[1:]], axis=0
          )
      if random_type == RandomType.PSEUDO_ANTITHETIC:
          random_type_sample = RandomType.PSEUDO
      else:
          random_type_sample = RandomType.STATELESS
      result = _mvnormal_pseudo(
          antithetic_shape,
          mean,
          covariance_matrix=covariance_matrix,
          scale_matrix=scale_matrix,
          random_type=random_type_sample,
          seed=seed,
          dtype=dtype,
      )
      if mean is None:
          return tf.concat([result, -result], axis=0)
      else:
          return tf.concat([result, 2 * mean - result], axis=0)
  
file_path: tf-quant-finance/tf_quant_finance/math/random_ops/multivariate_normal.py
imports: import enum
  import numpy
  import tensorflow.compat.v2
  from tf_quant_finance.math.random_ops import halton
  from tf_quant_finance.math.random_ops import sobol
label_desc: Use image node_id 3 for calling a global function with example usage: _mvnormal_pseudo_antithetic(sample_shape, mean, covariance_matrix, scale_matrix, random_type, seed, dtype) and returns: tf, tf