import ntpath


def _path_leaf(path: str) -> str:
    """
    Return the leaf object of the given path.
    :param path: directory path to parse
    :return: leaf object of path
    """
    head, tail = ntpath.split(path)
    return tail or ntpath.basename(head)