class_docstr: Tests for `WITRedirectPluginLoader`.
code: def test_does_not_load_when_dynamic_plugin_present(self):
      with contextlib.ExitStack() as stack:
          stack.enter_context(mock.patch.dict(sys.modules))
          sys.modules.pop(_DYNAMIC_PLUGIN_MODULE, None)
  
          real_import = __import__
  
          def fake_import(name, *args, **kwargs):
              if name == _DYNAMIC_PLUGIN_MODULE:
                  arbitrary_module = sys
                  sys.modules.setdefault(
                      _DYNAMIC_PLUGIN_MODULE, arbitrary_module
                  )
                  return arbitrary_module
              else:
                  return real_import(name, *args, **kwargs)
  
          stack.enter_context(
              mock.patch("builtins.__import__", fake_import)
          )
  
          plugin_class = wit_redirect_plugin._WITRedirectPlugin
          plugin_init = stack.enter_context(
              mock.patch.object(
                  plugin_class, "__init__", return_value=None
              )
          )
  
          loader = wit_redirect_plugin.WITRedirectPluginLoader()
          context = base_plugin.TBContext()
          result = loader.load(context)
          self.assertIsNone(result)
          plugin_init.assert_not_called()
  
file_path: tensorboard/tensorboard/plugins/wit_redirect/wit_redirect_plugin_test.py
imports: import contextlib
  import sys
  from unittest import mock
  from tensorboard.plugins import base_plugin
  from tensorboard.plugins.wit_redirect import wit_redirect_plugin
  from tensorboard import test
label_desc: Use image node_id 2 for calling the WITRedirectPluginLoaderTest obj's underlying member method code with example usage: obj.test_does_not_load_when_dynamic_plugin_present() and returns: arbitrary_module, real_import