code: def cls_from_str(name: str) -> type:
      """Returns a class object with the name given as a string."""
      try:
          module_name, cls_name = name.split(":")
      except ValueError:
          raise ConfigError(
              "Expected class description in a `module.submodules:ClassName` form, but got `{}`".format(
                  name
              )
          )
  
      return getattr(importlib.import_module(module_name), cls_name)
  
file_path: DeepPavlov/deeppavlov/core/common/registry.py
imports: import importlib
  import json
  from logging import getLogger
  from pathlib import Path
  from deeppavlov.core.common.errors import ConfigError
label_desc: Use image node_id 1 for calling a global function with example usage: cls_from_str(name) and returns: getattr