code: def get_class(path: str) -> type:
      """
      Look up a class based on a dotpath.
      Fails if the path does not point to a class.
  
      >>> import my_module
      >>> from hydra.utils import get_class
      >>> assert get_class("my_module.MyClass") is my_module.MyClass
      """
      try:
          cls = _locate(path)
          if not isinstance(cls, type):
              raise ValueError(
                  f"Located non-class of type '{type(cls).__name__}'"
                  + f" while loading '{path}'"
              )
          return cls
      except Exception as e:
          log.error(f"Error getting class at {path}: {e}")
          raise e
  
file_path: hydra/hydra/utils.py
imports: import logging.config
  import os
  from pathlib import Path
  from typing import Any, Callable
  import hydra._internal.instantiate._instantiate2
  import hydra.types
  from hydra._internal.utils import _locate
  from hydra.core.hydra_config import HydraConfig
label_desc: Use image node_id 1 for calling a global function with example usage: get_class(path) and returns: cls