code: def test_fit(self, wrapped_extract_ssd: Mock) -> None:
      ms = ModelSpec(model_enum=Models.GPEI)
      # This should fit the model as usual.
      ms.fit(experiment=self.experiment, data=self.data)
      wrapped_extract_ssd.assert_called_once()
      self.assertIsNotNone(ms._last_fit_arg_ids)
      self.assertEqual(
          ms._last_fit_arg_ids["experiment"], id(self.experiment)
      )
      # This should skip the model fit.
      with mock.patch("ax.modelbridge.torch.logger") as mock_logger:
          ms.fit(experiment=self.experiment, data=self.data)
      mock_logger.info.assert_called_with(
          "The observations are identical to the last set of observations "
          "used to fit the model. Skipping model fitting."
      )
      wrapped_extract_ssd.assert_called_once()
  
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 2 for calling the ModelSpecTest obj's underlying member method code with example usage: obj.test_fit(wrapped_extract_ssd) without return types