code: def test_gen(self) -> None:
      dat = self.branin_experiment.lookup_data()
      self.sobol_generation_node.fit(
          experiment=self.branin_experiment,
          data=dat,
      )
      with patch.object(
          self.sobol_model_spec, "gen", wraps=self.sobol_model_spec.gen
      ) as mock_model_spec_gen:
          gr = self.sobol_generation_node.gen(
              n=1, pending_observations={"branin": []}
          )
      mock_model_spec_gen.assert_called_with(
          n=1, pending_observations={"branin": []}
      )
      self.assertEqual(gr._model_key, self.sobol_model_spec.model_key)
      # pyre-fixme[16]: Optional type has no attribute `get`.
      self.assertEqual(gr._model_kwargs.get("init_position"), 3)
  
imports: import logging
  from logging import Logger
  from unittest.mock import patch, PropertyMock
  from ax.core.base_trial import TrialStatus
  from ax.core.observation import ObservationFeatures
  from ax.exceptions.core import UserInputError
  from ax.modelbridge.cross_validation import DiagnosticCriterion, MetricAggregation, SingleDiagnosticBestModelSelector
  from ax.modelbridge.factory import get_sobol
  from ax.modelbridge.generation_node import GenerationNode, GenerationStep
  from ax.modelbridge.model_spec import FactoryFunctionModelSpec, ModelSpec
  from ax.modelbridge.registry import Models
  from ax.modelbridge.transition_criterion import MaxTrials
  from ax.utils.common.logger import get_logger
  from ax.utils.common.testutils import TestCase
  from ax.utils.testing.core_stubs import get_branin_experiment
  from ax.utils.testing.mock import fast_botorch_optimize
label_desc: Use image node_id 4 for calling the TestGenerationNode obj's underlying member method code with example usage: obj.test_gen() without return types