def METHOD_NAME(rsbagfile, executor, o3dvis):
    """Show point cloud video coming from a RealSense bag file. Save frames to
    disk in capture/{color,depth} folders.
    """
    rsbag = io3d.RSBagReader.create(rsbagfile)
    if not rsbag.is_opened():
        raise RuntimeError(f"RS bag file {rsbagfile} could not be opened.")
    mdata = rsbag.metadata
    print(mdata)
    os.makedirs("capture/color")
    os.makedirs("capture/depth")
    def on_window_close():
        nonlocal rsbag, executor
        executor.shutdown()
        rsbag.close()
        return True  # OK to close window
    o3dvis.set_on_close(on_window_close)
    rgbd_frame = rsbag.next_frame()
    while not rsbag.is_eof():
        # Run each IO operation in the threadpool
        rgbd_frame_future = executor.submit(rsbag.next_frame)
        point_cloud_video(executor, rgbd_frame, mdata, rsbag.get_timestamp(),
                          o3dvis)
        rgbd_frame = rgbd_frame_future.result()