code: def test_mixture_of_product_distribution_extreme_case() -> None:
      rng = np.random.RandomState(0)
      mixture_distribution = _MixtureOfProductDistribution(
          weights=np.array([1.0, 0.0]),
          distributions=[
              _BatchedTruncNormDistributions(
                  mu=np.array([0.5, 0.3]),
                  sigma=np.array([1e-10, 1.0]),
                  low=-1.0,
                  high=1.0,
              ),
              _BatchedDiscreteTruncNormDistributions(
                  mu=np.array([-0.5, 1.0]),
                  sigma=np.array([1e-10, 1.0]),
                  low=-1.0,
                  high=0.5,
                  step=0.5,
              ),
              _BatchedCategoricalDistributions(
                  weights=np.array([[0, 1], [0.2, 0.8]])
              ),
          ],
      )
      samples = mixture_distribution.sample(rng, 2)
      np.testing.assert_almost_equal(
          samples, np.array([[0.5, -0.5, 1.0]] * 2)
      )
  
      # The first point has the highest probability,
      # and all other points have probability almost zero.
      x = np.array(
          [
              [0.5, 0.5, 1.0],
              [0.1, 0.5, 1.0],
              [0.5, 0.0, 1.0],
              [0.5, 0.5, 0.0],
          ]
      )
      with warnings.catch_warnings():
          warnings.simplefilter(
              "ignore", RuntimeWarning
          )  # Ignore log(0) warnings.
          log_pdf = mixture_distribution.log_pdf(x)
      assert np.all(log_pdf[1:] < -100)
  
file_path: optuna/tests/samplers_tests/tpe_tests/test_probability_distributions.py
imports: import warnings
  import numpy
  from optuna.samplers._tpe.probability_distributions import _BatchedCategoricalDistributions
  from optuna.samplers._tpe.probability_distributions import _BatchedDiscreteTruncNormDistributions
  from optuna.samplers._tpe.probability_distributions import _BatchedTruncNormDistributions
  from optuna.samplers._tpe.probability_distributions import _MixtureOfProductDistribution
label_desc: Use image node_id 2 for calling a global function with example usage: test_mixture_of_product_distribution_extreme_case() without return types