code: def test_construct(self) -> None:
      ms = FactoryFunctionModelSpec(factory_function=get_sobol)
      with self.assertRaises(UserInputError):
          ms.gen(n=1)
      ms.fit(experiment=self.experiment, data=self.data)
      ms.gen(n=1)
  
imports: import warnings
  from unittest import mock
  from unittest.mock import MagicMock, Mock, patch
  from ax.core.observation import ObservationFeatures
  from ax.exceptions.core import UserInputError
  from ax.modelbridge.factory import get_sobol
  from ax.modelbridge.model_spec import FactoryFunctionModelSpec, ModelSpec
  from ax.modelbridge.modelbridge_utils import extract_search_space_digest
  from ax.modelbridge.registry import Models
  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 1 for calling the FactoryFunctionModelSpecTest obj's underlying member method code with example usage: obj.test_construct() without return types