code: def pathstrip(path, n):
    
    pathlist = [path]
    while os.path.dirname(pathlist[0]) != b'':
      pathlist[0:1] = os.path.split(pathlist[0])
    return b'/'.join(pathlist[n:])
docs: Strip n leading components from the given path