code: def _check_conditional_dependency(
      obj,
      condition,
      package,
      severity,
      package_import_alias=None,
      msg=None,
  ):
      """If `condition` applies, check the soft dependency `package` installation.
  
      Call _check_soft_dependencies.
      If `package` is not installed, raise ModuleNotFoundError with
      `msg` as the error message.
  
      Parameters
      ----------
      condition : bool
          The condition to perform the soft dependency check.
      msg : str
          Error message to attach to ModuleNotFoundError.
      package : str
          Package name for soft dependency check.
      package_import_alias : dict with str keys and values or None, optional, default=None
          import name is str used in python import, i.e., from import_name import ...
          should be provided if import name differs from package name
      severity : str
          'error' or 'warning'.
  
      Raises
      ------
      ModuleNotFoundError
          error with informative message, asking to install required soft dependencies
      """
      if condition:
          if msg is None:
              msg = (
                  f"The specific parameter values of {obj.__class__.__name__}'s "
                  f"class instance require `{package}` installed. Please run: "
                  f"`pip install {package}` to "
                  f"install the `{package}` package. "
              )
          try:
              _check_soft_dependencies(
                  package,
                  package_import_alias=package_import_alias,
                  severity=severity,
                  obj=obj,
              )
          except ModuleNotFoundError as e:
              raise ModuleNotFoundError(msg) from e
  
imports: import numpy
  from sktime.transformations.base import BaseTransformer
  from sktime.utils.validation._dependencies import _check_soft_dependencies
  from sktime.utils.warnings import warn
label_desc: Use image node_id 4 for calling a global function with example usage: _check_conditional_dependency(obj, condition, package, severity, package_import_alias, msg) without return types