def load_class_or_exit()

in pplbench/lib/utils.py [0:0]


def load_class_or_exit(class_name: str) -> Any:
    """
    Load the given `class_name` or exit the process.
    :param class_name: The class to be loaded.
    :returns: a class object
    """
    class_ = pydoc.locate(class_name)
    if class_ is None:
        LOGGER.error(f"class `{class_name}` not found. Exiting!`")
        sys.exit(1)
    LOGGER.debug(f"loaded class `{class_}`")
    return class_