import importlib


def class_name_to_type(classname):
    """
    Turns the class name into a type.

    :param classname: the class name to convert (a.b.Cls)
    :type classname: str
    :return: the type
    :rtype: type
    """
    p = classname.split(".")
    m = ".".join(p[:-1])
    c = p[-1]
    return getattr(importlib.import_module(m), c)