def pathsplit(path):
    """Split a /-delimited path into a directory part and a basename.

    :param path: The path to split.
    :return: Tuple with directory name and basename
    """
    try:
        (dirname, basename) = path.rsplit("/", 1)
    except __HOLE__:
        return ("", path)
    else:
        return (dirname, basename)
dataset/ETHPy150Open natestedman/Observatory/observatory/lib/dulwich/index.py/pathsplit