def _ToLocalPath(toplevel_dir, path):
 if (path == toplevel_dir):
  return ''
 if path.startswith((toplevel_dir + '/')):
  return path[(len(toplevel_dir) + len('/')):]
 return path

def _ToLocalPath ( toplevel_dir , path ) : if ( path == toplevel_dir ) : return '' if path . startswith ( ( toplevel_dir + '/' ) ) : return path [ ( len ( toplevel_dir ) + len ( '/' ) ) : ] return path
converts |path| to a path relative to |toplevel_dir| .