from typing import Tuple
from typing import Optional


def parse_qualname(qualname: str) -> Tuple[Optional[str], str]:
    """
    :param qualname: like: numpy.ndarray
    :return:
        module_path = numpy
        type_name = ndarry
    """
    if "." in qualname:
        s = qualname.split(".")
        module_path = ".".join(s[:-1])
        type_name = s[-1]
    else:
        type_name = qualname
        module_path = None
    return module_path, type_name