code: def test_pop_choice(self):
      choices = ["my_model", "other_model"]
      params = Params({"model": "my_model"})
      assert params.pop_choice("model", choices) == "my_model"
  
      params = Params({"model": "non_existent_model"})
      with pytest.raises(ConfigurationError):
          params.pop_choice("model", choices)
  
      params = Params({"model": "module.submodule.ModelName"})
      assert (
          params.pop_choice("model", "choices")
          == "module.submodule.ModelName"
      )
  
      params = Params({"model": "module.submodule.ModelName"})
      with pytest.raises(ConfigurationError):
          params.pop_choice("model", choices, allow_class_names=False)
  
imports: import json
  import os
  import re
  from collections import OrderedDict
  import pytest
  from allennlp.common.checks import ConfigurationError
  from allennlp.common.params import infer_and_cast, Params, remove_keys_from_params, with_overrides
  from allennlp.common.testing import AllenNlpTestCase
label_desc: Use image node_id 15 for calling the TestParams obj's underlying member method code with example usage: obj.test_pop_choice() without return types