def load_class(class_path):
    """
    Load and return the class from the given module.

    Args:
        class_path (str): full path to class to be loaded, e. g.
            sklearn.linear_model.LinearRegression

    Returns:
        class
    """
    module_path, class_name = class_path.rsplit('.', 1)
    mod = __import__(module_path, globals(), locals(), [class_name], 0)
    return getattr(mod, class_name)