parameters: (path, toplevel_dir=None)
return_statement: return RelativePath(toplevel_dir, os.path.join(toplevel_dir, path))
docstring: Given a path like foo/bar that is relative to toplevel_dir, return
    the inverse relative path back to the toplevel_dir.
  
    E.g. os.path.normpath(os.path.join(path, InvertRelativePath(path)))
    should always produce the empty string, unless the path contains symlinks.
docstring_summary: Given a path like foo/bar that is relative to toplevel_dir, return
    the inverse relative path back to the toplevel_dir.
docstring_tokens: Given a path like foo / bar that is relative to toplevel_dir return the inverse relative path back to the toplevel_dir .
function: def InvertRelativePath(path, toplevel_dir=None):
    """Given a path like foo/bar that is relative to toplevel_dir, return
    the inverse relative path back to the toplevel_dir.
  
    E.g. os.path.normpath(os.path.join(path, InvertRelativePath(path)))
    should always produce the empty string, unless the path contains symlinks.
    """
    if not path:
      return path
    toplevel_dir = '.' if toplevel_dir is None else toplevel_dir
    return RelativePath(toplevel_dir, os.path.join(toplevel_dir, path))
function_tokens: def InvertRelativePath ( path , toplevel_dir = None ) : if not path : return path toplevel_dir = '.' if toplevel_dir is None else toplevel_dir return RelativePath ( toplevel_dir , os . path . join ( toplevel_dir , path ) )