code: def test_factory_functions(self) -> None:
      experiment = get_branin_experiment(with_batch=True)
      B = np.array([[1.0, 2.0]])
      m1 = get_ALEBOInitializer(
          search_space=experiment.search_space, B=B
      )
      # pyre-fixme[16]: `RandomModel` has no attribute `Q`.
      self.assertTrue(np.allclose(m1.model.Q, np.linalg.pinv(B) @ B))
      data = Data(
          pd.DataFrame(
              {
                  "arm_name": ["0_0", "0_1", "0_2"],
                  "metric_name": "y",
                  "mean": [-1.0, 0.0, 1.0],
                  "sem": 0.1,
              }
          )
      )
      with mock.patch(
          "ax.modelbridge.strategies.alebo.ALEBO.fit", autospec=True
      ):
          m2 = get_ALEBO(
              experiment=experiment,
              # pyre-fixme[6]: For 2nd param expected `SearchSpace` but got `None`.
              search_space=None,
              data=data,
              B=torch.tensor(B),
          )
  
      # pyre-fixme[16]: Optional type has no attribute `B`.
      self.assertTrue(np.array_equal(m2.model.B.numpy(), B))
  
file_path: Ax/ax/modelbridge/tests/test_alebo_strategy.py
imports: from unittest import mock
  import numpy
  import pandas
  import torch
  from ax.core.data import Data
  from ax.modelbridge.strategies.alebo import ALEBOStrategy, get_ALEBO, get_ALEBOInitializer
  from ax.utils.common.testutils import TestCase
  from ax.utils.testing.core_stubs import get_branin_experiment
label_desc: Use image node_id 1 for calling the ALEBOStrategyTest obj's underlying member method code with example usage: obj.test_factory_functions() without return types