def METHOD_NAME(path):
    # relpath doesn't support UNC
    if path.startswith('\\'):
        return path
    path = os.path.relpath(path)
    if path.startswith('../../'):
        path = os.path.abspath(path)
    return path