code: def rgbd2fragment_rough(
      list_path_img,
      path_intrinsic,
      list_path_trans,
      out_path,
      num_frame_per_fragment=5,
      pre_transform=None,
      list_path_color=None,
  ):
      one_fragment = []
      one_color = []
      ind = 0
      for i, path_img in tqdm(
          enumerate(list_path_img), total=len(list_path_img)
      ):
          path_trans = list_path_trans[i]
          path_color = None
          if list_path_color is not None:
              path_color = list_path_color[i]
              pcd, color = rgbd2pcd(
                  path_img,
                  path_intrinsic,
                  path_trans,
                  path_color=path_color,
              )
              one_fragment.append(pcd)
              one_color.append(color)
          else:
              pcd = rgbd2pcd(
                  path_img,
                  path_intrinsic,
                  path_trans,
                  path_color=path_color,
              )
              one_fragment.append(pcd)
          if (i + 1) % num_frame_per_fragment == 0:
              pos = torch.from_numpy(
                  np.concatenate(one_fragment, axis=0)
              )
              if list_path_color is None:
                  torch_data = Data(pos=pos)
              else:
                  color = torch.from_numpy(
                      np.concatenate(one_color, axis=0)
                  )
                  torch_data = Data(pos=pos, color=color)
              if pre_transform is not None:
                  torch_data = pre_transform(torch_data)
              torch.save(
                  torch_data,
                  osp.join(out_path, "fragment_{:06d}.pt".format(ind)),
              )
              ind += 1
              one_fragment = []
              one_color = []
  
imports: import collections
  import errno
  import numpy
  import os
  import os.path
  import torch
  from torch_geometric.data import Data
  from torch_points_kernels.points_cpu import ball_query
  import imageio
  from tqdm.auto import tqdm
  from torch_points3d.core.data_transform import GridSampling3D, SaveOriginalPosId
  from torch_geometric.transforms import Compose
  import torch_points3d.datasets.registration.fusion
  from torch_cluster import fps
label_desc: Use image node_id 7 for calling a global function with example usage: rgbd2fragment_rough(list_path_img, path_intrinsic, list_path_trans, out_path, num_frame_per_fragment, pre_transform, list_path_color) without return types