code: def rgbd2fragment_fine(
      list_path_img,
      path_intrinsic,
      list_path_trans,
      out_path,
      num_frame_per_fragment=5,
      voxel_size=0.01,
      pre_transform=None,
      depth_thresh=6,
      save_pc=True,
      limit_size=600,
  ):
      """
      fuse rgbd frame with a tsdf volume and get the mesh using marching cube.
      """
  
      ind = 0
      begin = 0
      end = num_frame_per_fragment
  
      vol_bnds = get_3D_bound(
          list_path_img[begin:end],
          path_intrinsic,
          list_path_trans[begin:end],
          depth_thresh,
          voxel_size=voxel_size,
          limit_size=limit_size,
      )
  
      print(vol_bnds)
      tsdf_vol = fusion.TSDFVolume(vol_bnds, voxel_size=voxel_size)
      for i, path_img in tqdm(
          enumerate(list_path_img), total=len(list_path_img)
      ):
          depth = imageio.imread(path_img).astype(float) / 1000.0
          depth[depth > depth_thresh] = 0
          depth[depth <= 0] = 0
          intrinsic = np.loadtxt(path_intrinsic)
          pose = np.loadtxt(list_path_trans[i])
          tsdf_vol.integrate(depth, intrinsic, pose, obs_weight=1.0)
          if (i + 1) % num_frame_per_fragment == 0:
              if save_pc:
                  pcd = tsdf_vol.get_point_cloud(0.35, 0.0)
                  torch_data = Data(pos=torch.from_numpy(pcd.copy()))
              else:
                  verts, faces, norms = tsdf_vol.get_mesh()
                  torch_data = Data(
                      pos=torch.from_numpy(verts.copy()),
                      norm=torch.from_numpy(norms.copy()),
                  )
              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
  
              if i + 1 < len(list_path_img):
                  begin = i + 1
                  if begin + num_frame_per_fragment < len(
                      list_path_img
                  ):
                      end = begin + num_frame_per_fragment
                      vol_bnds = get_3D_bound(
                          list_path_img[begin:end],
                          path_intrinsic,
                          list_path_trans[begin:end],
                          depth_thresh,
                          voxel_size=voxel_size,
                          limit_size=limit_size,
                      )
                  else:
                      vol_bnds = get_3D_bound(
                          list_path_img[begin:],
                          path_intrinsic,
                          list_path_trans[begin:],
                          depth_thresh,
                          voxel_size=voxel_size,
                          limit_size=limit_size,
                      )
                  tsdf_vol = fusion.TSDFVolume(
                      vol_bnds, voxel_size=voxel_size
                  )
  
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 12 for calling a global function with example usage: rgbd2fragment_fine(list_path_img, path_intrinsic, list_path_trans, out_path, num_frame_per_fragment, voxel_size, pre_transform, depth_thresh, save_pc, limit_size) without return types