def type_from_cli_repr(cli_string: str) ->type:
    """
    Imports a class from its CLI representation.
    TODO: Move to meta package

    :param cli_string:  The CLI representation of the class.
    :return:            The class.
    """
    locals_ = dict(locals())
    parts = cli_string.split('.')
    for i in range(len(parts) - 1, 0, -1):
        code = f"from {'.'.join(parts[:i])} import {parts[i]} as result"
        if i != len(parts) - 1:
            code += f"\nresult = result.{'.'.join(parts[i + 1:])}"
        try:
            exec(code, globals(), locals_)
        except ImportError:
            pass
        else:
            return locals_['result']
    raise ImportError(f"Couldn't import class '{cli_string}'")
