code: def initial_voxelize(z, init_res, after_res):
      new_float_coord = torch.cat(
          [(z.C[:, :3] * init_res) / after_res, z.C[:, -1].view(-1, 1)],
          1,
      )
  
      pc_hash = spf.sphash(torch.floor(new_float_coord).int())
      sparse_hash = torch.unique(pc_hash)
      idx_query = spf.sphashquery(pc_hash, sparse_hash)
      counts = spf.spcount(idx_query.int(), len(sparse_hash))
  
      inserted_coords = spf.spvoxelize(
          torch.floor(new_float_coord), idx_query, counts
      )
      inserted_coords = torch.round(inserted_coords).int()
      inserted_feat = spf.spvoxelize(z.F, idx_query, counts)
  
      new_tensor = SparseTensor(inserted_feat, inserted_coords, 1)
      new_tensor.check()
      z.additional_features["idx_query"][1] = idx_query
      z.additional_features["counts"][1] = counts
      z.C = new_float_coord
  
      return new_tensor
  
file_path: torch-points3d/torch_points3d/modules/PVCNN/utils.py
imports: import torchsparse
  import torchsparse.nn
  import torchsparse.nn.functional
  from torchsparse.sparse_tensor import SparseTensor
  from torchsparse.point_tensor import PointTensor
  from torchsparse.utils.kernel_region import *
  from torchsparse.utils.helpers import *
label_desc: Use image node_id 1 for calling a global function with example usage: initial_voxelize(z, init_res, after_res) and returns: new_tensor