code: def propSampleCorrectMarginals(
      self, dist, special_class, under_hypothesis=False
  ):
      # Property: When projected on one class, multinomial should sample the
      # binomial distribution.
      seed = test_util.test_seed()
      num_samples = 120000
      needed = self.evaluate(
          st.min_num_samples_for_dkwm_cdf_test(
              0.02, false_fail_rate=1e-9, false_pass_rate=1e-9
          )
      )
      self.assertGreater(num_samples, needed)
      samples = dist.sample(num_samples, seed=seed)
      successes = samples[..., special_class]
      prob_success = dist._probs_parameter_no_checks()[
          ..., special_class
      ]
      if under_hypothesis:
          hp.note(
              "Expected probability of success {}".format(prob_success)
          )
          hp.note("Successes obtained {}".format(successes))
      expected_dist = binomial.Binomial(
          dist.total_count, probs=prob_success
      )
      self.evaluate(
          st.assert_true_cdf_equal_by_dkwm(
              successes,
              expected_dist.cdf,
              st.left_continuous_cdf_discrete_distribution(
                  expected_dist
              ),
              false_fail_rate=1e-9,
          )
      )
  
imports: import unittest
  from absl.testing import parameterized
  import hypothesis
  from hypothesis import strategies
  import numpy
  import tensorflow.compat.v1
  import tensorflow.compat.v2
  from tensorflow_probability.python.bijectors import identity
  from tensorflow_probability.python.distributions import binomial
  from tensorflow_probability.python.distributions import hypothesis_testlib
  from tensorflow_probability.python.distributions import multinomial
  from tensorflow_probability.python.distributions.internal import statistical_testing
  from tensorflow_probability.python.internal import hypothesis_testlib
  from tensorflow_probability.python.internal import test_util
  from tensorflow_probability.python.math import gradient
  from tensorflow_probability.python.util import deferred_tensor
label_desc: Use image node_id 26 for calling the MultinomialTest obj's underlying member method code with example usage: obj.propSampleCorrectMarginals(dist, special_class, under_hypothesis) without return types