def get_class(clazzname):
    """
    Dynamically retrieve a class from its name.

    (From http://stackoverflow.com/questions/547829/how-to-dynamically-load-a-python-class)

    :param clazzname: Name of the class to load.
    :rtype: Class
    """
    components = clazzname.split('.')
    mod = __import__(components[0])
    for comp in components[1:]:
        mod = getattr(mod, comp)
    return mod
