def METHOD_NAME(self):
    # If remote code is not set, we will time out when asking whether to load the model.
    with self.assertRaises(ValueError):
        config = AutoConfig.from_pretrained("hf-internal-testing/test_dynamic_model")
    # If remote code is disabled, we can't load this config.
    with self.assertRaises(ValueError):
        config = AutoConfig.from_pretrained("hf-internal-testing/test_dynamic_model", trust_remote_code=False)
    config = AutoConfig.from_pretrained("hf-internal-testing/test_dynamic_model", trust_remote_code=True)
    self.assertEqual(config.__class__.__name__, "NewModelConfig")
    # Test config can be reloaded.
    with tempfile.TemporaryDirectory() as tmp_dir:
        config.save_pretrained(tmp_dir)
        reloaded_config = AutoConfig.from_pretrained(tmp_dir, trust_remote_code=True)
    self.assertEqual(reloaded_config.__class__.__name__, "NewModelConfig")