def parse_path(path):
    fullpath = path
    # remove duplicate consecutive slashes: e.g. /// -> /
    filtered_path = [k for k, _ in groupby(fullpath.split('/')) if k != '']
    filtered_path.insert(0, '/')  # add root container

    # if we have length one, the can only be a root path. For that we define
    # container_path = ['/'], i.e. it is self-contained.
    if len(filtered_path) == 1:
        return ('/', ['/'], '/')
    else:
        return (filtered_path[-1], filtered_path[:-1],
                "/".join(filtered_path)[1:])
Parse request path, return (name, [container_path], fullpath) tuple.
dataset/ETHPy150Open livenson/vcdm/src/vcdm/server/cdmi/generic.py/parse_path