def vfs_construct_path(base_path, *path_components):
    path = base_path
    for component in path_components:
        if component.startswith('/'):
            path = component
        elif path == '' or path.endswith('/'):
            path += component
        else:
            path += '/%s' % component
    return path
Mimics behavior of os.path.join on Posix machines.
dataset/ETHPy150Open oppia/oppia/utils.py/vfs_construct_path