import inspect


def get_class_from_name(module, class_name):
    """
    Gets the class from the string name within the given module.
    :param module:
    :param class_name:
    :return: class
    """
    cls_names = [m[0] for m in inspect.getmembers(module, inspect.isclass)]
    assert class_name.lower() in [x.lower() for x in cls_names], 'Class name not found.'
    cls_name = cls_names[[x.lower() for x in cls_names].index(class_name.lower())]
    return getattr(module, cls_name)