code: def validate_config(
      conf: t.Dict[str, t.Any],
      version_unmatch: VersionUnmatchAction = "warn",
  ) -> t.Dict[str, t.Any]:
      """Validate check/suite configuration dictionary."""
      if "module_name" not in conf or not conf["module_name"]:
          raise ValueError(
              'Configuration must contain not empty "module_name" key of type string'
          )
  
      if "class_name" not in conf or not conf["class_name"]:
          raise ValueError(
              'Configuration must contain not empty "class_name" key of type string'
          )
  
      if "version" not in conf or not conf["version"]:
          if version_unmatch == "raise":
              raise ValueError(
                  "Configuration must contain not emtpy "
                  '"version" key of type string'
              )
          elif version_unmatch == "warn":
              get_logger().warning(
                  "Configuration was expected to contain not emtpy "
                  '"version" key of type string'
              )
  
      elif conf["version"] != __version__:
          if version_unmatch == "raise":
              raise ValueError(
                  "Configuration was formed by different version of deepchecks package.\n"
                  f'Configuration version: {conf["version"]}\n'
                  f"Deepchecks version: {__version__}\n"
              )
          elif version_unmatch == "warn":
              get_logger().warning(
                  "Configuration was formed by different version of deepchecks package.\n"
                  "Therefore a behavior of the check might be different than expected.\n"
                  "Configuration version: %s\n"
                  "Deepchecks version: %s\n",
                  conf["version"],
                  __version__,
              )
  
      return conf
  
file_path: deepchecks/deepchecks/core/common.py
imports: import importlib
  import typing
  from typing_extensions import Literal
  from deepchecks import __version__
  from deepchecks.utils.logger import get_logger
label_desc: Use image node_id 3 for calling a global function with example usage: validate_config(conf, version_unmatch) and returns: conf