code: def test_ThompsonSamplerValidation(self) -> None:
      generator = ThompsonSampler(min_weight=0.01)
  
      # all Xs are not the same
      with self.assertRaises(ValueError):
          generator.fit(
              Xs=[
                  [[1, 1], [2, 2], [3, 3], [4, 4]],
                  [[1, 1], [2, 2], [4, 4]],
              ],
              # 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,
          )
  
      # multiple observations per parameterization
      with self.assertRaises(ValueError):
          generator.fit(
              Xs=[[[1, 1], [2, 2], [2, 2]]],
              # 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,
          )
  
      # these are not the same observations, so should not error
      generator.fit(
          Xs=[[[1, 1], [2.0, 2], [2, 2]]],
          # 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,
      )
  
      # requires objective weights
      with self.assertRaises(ValueError):
          # pyre-fixme[6]: For 2nd param expected `List[List[Union[None, bool,
          #  float, int, str]]]` but got `List[List[int]]`.
          generator.gen(
              5, self.parameter_values, objective_weights=None
          )
  
file_path: Ax/ax/models/tests/test_thompson.py
imports: import numpy
  from ax.exceptions.model import ModelError
  from ax.models.discrete.thompson import ThompsonSampler
  from ax.utils.common.testutils import TestCase
label_desc: Use image node_id 3 for calling the ThompsonSamplerTest obj's underlying member method code with example usage: obj.test_ThompsonSamplerValidation() without return types