code: def test_EmpiricalBayesThompsonSamplerGen(self) -> None:
      generator = EmpiricalBayesThompsonSampler(min_weight=0.0)
      generator.fit(
          # pyre-fixme[6]: For 1st param expected `List[List[List[Union[None,
          #  bool, float, int, str]]]]` but got `List[List[List[int]]]`.
          Xs=self.Xs,
          # pyre-fixme[6]: For 2nd param expected `List[List[float]]` but got
          #  `List[List[int]]`.
          Ys=self.Ys,
          # pyre-fixme[6]: For 3rd param expected `List[List[float]]` but got
          #  `List[List[int]]`.
          Yvars=self.Yvars,
          # pyre-fixme[6]: For 4th param expected `List[List[Union[None, bool,
          #  float, int, str]]]` but got `List[List[int]]`.
          parameter_values=self.parameter_values,
          outcome_names=self.outcome_names,
      )
      with patch(
          "ax.models.discrete.eb_thompson.EmpiricalBayesThompsonSampler",
          return_value=(
              [[4, 4], [3, 3], [2, 2], [1, 1]],
              [
                  2.67,
                  0,
                  0.25,
                  0.07,
              ],
          ),
      ):
          arms, weights, _ = generator.gen(
              n=5,
              # pyre-fixme[6]: For 2nd param expected `List[List[Union[None, bool,
              #  float, int, str]]]` but got `List[List[int]]`.
              parameter_values=self.parameter_values,
              objective_weights=np.array([1, 0]),
          )
          self.assertEqual(arms, [[4, 4], [3, 3], [2, 2], [1, 1]])
          for weight, expected_weight in zip(
              weights, [4 * i for i in [0.66, 0.25, 0.07, 0.02]]
          ):
              self.assertAlmostEqual(weight, expected_weight, delta=0.1)
  
file_path: Ax/ax/models/tests/test_eb_thompson.py
imports: from unittest.mock import patch
  import numpy
  from ax.models.discrete.eb_thompson import EmpiricalBayesThompsonSampler
  from ax.utils.common.testutils import TestCase
label_desc: Use image node_id 3 for calling the EmpiricalBayesThompsonSamplerTest obj's underlying member method code with example usage: obj.test_EmpiricalBayesThompsonSamplerGen() without return types