code: def test_basic2(self):
      space = hp.choice(
          "normal_choice",
          [
              hp.pchoice(
                  "fsd", [(0.1, "first"), (0.8, "second"), (0.1, 2)]
              ),
              hp.choice("something_else", [10, 20]),
          ],
      )
      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 == "first":
              a += 1
          elif nesto == "second":
              b += 1
          elif nesto == 2:
              c += 1
          elif nesto in (10, 20):
              pass
          else:
              assert 0, nesto
      print((a, b, c))
      assert b > 2 * a
      assert b > 2 * c
  
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 2 for calling the TestPChoice obj's underlying member method code with example usage: obj.test_basic2() without return types