code: def test_basic(self):
      space = hp.pchoice(
          "naive_type",
          [
              (0.14, "gaussian"),
              (0.02, "multinomial"),
              (0.84, "bernoulli"),
          ],
      )
      a, b, c = 0, 0, 0
      rng = np.random.default_rng(123)
      for i in range(0, 1000):
          nesto = hyperopt.pyll.stochastic.sample(space, rng=rng)
          if nesto == "gaussian":
              a += 1
          elif nesto == "multinomial":
              b += 1
          elif nesto == "bernoulli":
              c += 1
      print((a, b, c))
      assert a + b + c == 1000
      assert 120 < a < 160
      assert 0 < b < 40
      assert 800 < c < 900
  
file_path: hyperopt/hyperopt/tests/unit/test_pchoice.py
imports: from functools import partial
  import numpy
  import unittest
  from hyperopt import hp, Trials, fmin, tpe, anneal, rand
  import hyperopt.pyll.stochastic
label_desc: Use image node_id 1 for calling the TestPChoice obj's underlying member method code with example usage: obj.test_basic() without return types