code: def accumulate_wrapper(loader, grid_size=0.05):
      """
      Args:
          loader: TenFpsDataLoader
      Returns:
          world_pc: (N, 3)
              xyz in world coordinate system
          world_sem: (N, d)
              semantic for each point
          grid_size: float
              keep only one point in each (g_size, g_size, g_size) grid
      """
      world_pc, world_rgb, poses = (
          np.zeros((0, 3)),
          np.zeros((0, 3)),
          [],
      )
      for i in range(len(loader)):
          frame = loader[i]
          print(f"{i}/{len(loader)}", frame["image_path"])
          image_path = frame["image_path"]
          pcd = frame["pcd"]  # in world coordinate
          pose = frame["pose"]
          rgb = frame["color"]
  
          world_pc = np.concatenate((world_pc, pcd), axis=0)
          world_rgb = np.concatenate((world_rgb, rgb), axis=0)
  
          choices = pc_utils.down_sample(world_pc, 0.05)
          world_pc = world_pc[choices]
          world_rgb = world_rgb[choices]
  
      return world_pc, world_rgb, poses
  
file_path: ARKitScenes/threedod/benchmark_scripts/data_prepare_offline.py
imports: import argparse
  import numpy
  import os
  import time
  import utils.box_utils
  import utils.pc_utils
  import utils.rotation
  import utils.taxonomy
  from utils.tenFpsDataLoader import TenFpsDataLoader, extract_gt
  import utils.visual_utils
label_desc: Use image node_id 1 for calling a global function with example usage: accumulate_wrapper(loader, grid_size) and returns: world_pc,  world_rgb,  poses