code: def test_loader_retrieval():
      from dtale.cli.loaders import custom_module_loader
  
      with ExitStack() as stack:
          stack.enter_context(
              mock.patch(
                  "platform.python_version_tuple",
                  mock.Mock(return_value=(2, 7, 3)),
              )
          )
          mock_loader = stack.enter_context(
              mock.patch(
                  "dtale.cli.loaders.get_py2_loader", mock.Mock()
              )
          )
          custom_module_loader()("custom.loaders", "loader.py")
          mock_loader.assert_called_once()
  
      with ExitStack() as stack:
          stack.enter_context(
              mock.patch(
                  "platform.python_version_tuple",
                  mock.Mock(return_value=(3, 0, 0)),
              )
          )
          with pytest.raises(Exception) as error:
              custom_module_loader()
              assert error.startswith(
                  "Unsupported version of python used for custom CLI loaders, (3, 0, 0)."
              )
  
      with ExitStack() as stack:
          stack.enter_context(
              mock.patch(
                  "platform.python_version_tuple",
                  mock.Mock(return_value=(3, 3, 0)),
              )
          )
          mock_loader = stack.enter_context(
              mock.patch(
                  "dtale.cli.loaders.get_py33_loader", mock.Mock()
              )
          )
          custom_module_loader()("custom.loaders", "loader.py")
          mock_loader.assert_called_once()
  
      with ExitStack() as stack:
          stack.enter_context(
              mock.patch(
                  "platform.python_version_tuple",
                  mock.Mock(return_value=(3, 6, 1)),
              )
          )
          mock_loader = stack.enter_context(
              mock.patch(
                  "dtale.cli.loaders.get_py35_loader", mock.Mock()
              )
          )
          custom_module_loader()("custom.loaders", "loader.py")
          mock_loader.assert_called_once()
  
imports: import os
  import sys
  from imp import reload
  import mock
  import pandas
  import pytest
  from six import PY3
  from dtale.cli import loaders, script
  from dtale.cli.clickutils import run
  from dtale.pandas_util import check_pandas_version
  from tests import ExitStack, pdt
label_desc: Use image node_id 9 for calling a global function with example usage: test_loader_retrieval() without return types