code: def test_loader_retrievers(builtin_pkg):
      from dtale.cli.loaders import (
          get_py35_loader,
          get_py33_loader,
          get_py2_loader,
      )
  
      orig_import = __import__
      mock_importlib_util = mock.Mock()
      mock_importlib_machinery = mock.Mock()
      mock_imp = mock.Mock()
  
      def import_mock(name, *args, **kwargs):
          if name == "importlib.util":
              return mock_importlib_util
          if name == "importlib.machinery":
              return mock_importlib_machinery
          if name == "imp":
              return mock_imp
          return orig_import(name, *args, **kwargs)
  
      with ExitStack() as stack:
          stack.enter_context(
              mock.patch(
                  "{}.__import__".format(builtin_pkg),
                  side_effect=import_mock,
              )
          )
  
          assert (
              get_py35_loader("custom.loaders", "loader.py") is not None
          )
          mock_importlib_util.util.spec_from_file_location.assert_called_once()
          mock_spec = (
              mock_importlib_util.util.spec_from_file_location.return_value
          )
          mock_importlib_util.util.module_from_spec.assert_called_once()
          mock_spec.loader.exec_module.assert_called_once()
          assert (
              get_py33_loader("custom.loaders", "loader.py") is not None
          )
          mock_importlib_machinery.SourceFileLoader.assert_called_once()
          mock_sourcefileloader = (
              mock_importlib_machinery.SourceFileLoader.return_value
          )
          mock_sourcefileloader.load_module.assert_called_once()
          assert (
              get_py2_loader("custom.loaders", "loader.py") is not None
          )
          mock_imp.load_source.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 10 for calling a global function with example usage: test_loader_retrievers(builtin_pkg) and returns: orig_import, mock_importlib_util, mock_importlib_machinery, mock_imp