code: def test_other_modules(self):
      # Create a new package in a temporary dir
      packagedir = self.TEST_DIR / "configexplorer"
      packagedir.mkdir()  # pylint: disable=no-member
      (packagedir / "__init__.py").touch()  # pylint: disable=no-member
  
      # And add that directory to the path
      sys.path.insert(0, unicode(self.TEST_DIR))
  
      # Write out a duplicate predictor there, but registered under a different name.
      from allennlp.predictors import bidaf
  
      with open(bidaf.__file__) as f:
          code = f.read().replace(
              """@Predictor.register('machine-comprehension')""",
              """@Predictor.register('config-explorer-predictor')""",
          )
  
      with open(os.path.join(packagedir, "predictor.py"), "w") as f:
          f.write(code)
  
      # Without specifying modules to load, it shouldn't be there
      app = make_app()
      app.testing = True
      client = app.test_client()
      response = client.get(
          "/api/config/?class=allennlp.predictors.predictor.Predictor"
      )
      data = json.loads(response.get_data())
      assert (
          "allennlp.predictors.bidaf.BidafPredictor" in data["choices"]
      )
      assert (
          "configexplorer.predictor.BidafPredictor"
          not in data["choices"]
      )
  
      # With specifying extra modules, it should be there.
      app = make_app(["configexplorer"])
      app.testing = True
      client = app.test_client()
      response = client.get(
          "/api/config/?class=allennlp.predictors.predictor.Predictor"
      )
      data = json.loads(response.get_data())
      assert (
          "allennlp.predictors.bidaf.BidafPredictor" in data["choices"]
      )
      assert (
          "configexplorer.predictor.BidafPredictor" in data["choices"]
      )
  
      sys.path.remove(unicode(self.TEST_DIR))
  
imports: from __future__ import with_statement
  from __future__ import division
  from __future__ import absolute_import
  from __future__ import print_function
  import json
  import os
  import pathlib
  import sys
  from allennlp.common.testing import AllenNlpTestCase
  from allennlp.service import config_explorer
  from allennlp.service.config_explorer import make_app, _HTML
  from io import open
label_desc: Use image node_id 11 for calling the TestConfigExplorer obj's underlying member method code with example usage: obj.test_other_modules() without return types