def METHOD_NAME(self):
    glfw_key_escape = 256
    glfw_key_space = 32
    vis = o3d.visualization.VisualizerWithKeyCallback()
    vis.register_key_callback(glfw_key_escape, self.escape_callback)
    vis.register_key_callback(glfw_key_space, self.space_callback)
    vis.create_window('recorder', 1920, 540)
    print("Recorder initialized. Press [SPACE] to start. "
          "Press [ESC] to save and exit.")
    vis_geometry_added = False
    while not self.flag_exit:
        rgbd = self.recorder.record_frame(self.flag_record,
                                          self.align_depth_to_color)
        if rgbd is None:
            continue
        if not vis_geometry_added:
            vis.add_geometry(rgbd)
            vis_geometry_added = True
        vis.update_geometry(rgbd)
        vis.poll_events()
        vis.update_renderer()
    self.recorder.close_record()