from typing import Any


def class_import(name: str) -> Any:
    """Import class from string."""
    d = name.rfind(".")
    classname = name[d + 1 : len(name)]
    m = __import__(name[0:d], globals(), locals(), [classname])

    return getattr(m, classname)