code: def import_optional_property_dependency(
      module: str,
      property_name: str,
      package_name: Optional[str] = None,
      error_template: Optional[str] = None,
  ):
      """Import additional modules in runtime."""
      try:
          lib = import_module(module)
      except ImportError as error:
          package_name = (
              package_name or module.split(".", maxsplit=1)[0]
          )
          error_template = error_template or (
              "property {property_name} requires the {package_name} python package. "
              "To get it, run:\n"
              ">> pip install {package_name}\n\n"
              "You may install dependencies for all text properties by running:\n"
              ">> pip install deepchecks[nlp-properties]\n"
          )
          raise ImportError(
              error_template.format(
                  property_name=property_name, package_name=package_name
              )
          ) from error
      else:
          return lib
  
file_path: deepchecks/deepchecks/nlp/utils/text_properties_models.py
imports: import logging
  import pathlib
  import warnings
  from contextlib import contextmanager
  from functools import lru_cache
  from importlib import import_module
  from typing import Optional, Union
  import requests
  from nltk import corpus
  from transformers.utils import logging
label_desc: Use image node_id 2 for calling a global function with example usage: import_optional_property_dependency(module, property_name, package_name, error_template) and returns: lib