code: def test_module_softdeps(module):
      """Test soft dependency imports in sktime modules."""
      # We try importing all modules and catch exceptions due to missing dependencies
      try:
          import_module(module)
      except ModuleNotFoundError as e:
          error_msg = str(e)
  
          if not is_soft_dep_missing_message(error_msg):
              raise RuntimeError(
                  f"The module: {module} seems to have unsatisfied soft "
                  f"dependency requirements, but does not raise an appropriate error "
                  f"message when the soft dependency requirement is not satisfied. "
                  f"Please use our `_check_soft_dependencies` function to "
                  f"raise an appropriate error with one of the predefined messages."
              ) from e
  
          # If the error is raised in a module which does depend on a soft dependency,
          # we ignore and skip it
          dependencies = SOFT_DEPENDENCIES.get(module, [])
          if any(
              dependency in error_msg for dependency in dependencies
          ):
              return None
  
          # Otherwise we raise an error
          dependency = _extract_dependency_from_error_msg(error_msg)
          raise ModuleNotFoundError(
              f"The module: {module} should not require any soft dependencies, "
              f"but tried importing: '{dependency}'. Make sure soft dependencies are "
              f"properly isolated."
          ) from e
  
imports: import pkgutil
  import re
  from importlib import import_module
  import pytest
  from sktime.registry import all_estimators
  from sktime.tests._config import EXCLUDE_ESTIMATORS
  from sktime.utils._testing.scenarios_getter import retrieve_scenarios
  from sktime.utils.validation._dependencies import _check_python_version, _check_soft_dependencies
label_desc: Use image node_id 6 for calling a global function with example usage: test_module_softdeps(module) and returns: None