import importlib


def load_class(module_name, class_name):
    """Load a class from a module, where class and module are specified as
    strings. Useful to dynamically build Capriqorn pipelines.
    """
    m = importlib.import_module(module_name)
    c = getattr(m, class_name)
    return c