def get_package_name() ->str:
    """
    Retrieves the toplevel package name.
    """
    root = __name__
    first_dot = root.find('.')
    if first_dot > 0:
        root = root[:first_dot]
    return root
