code: def point_to_voxel(x, z):
      if (
          z.additional_features is None
          or z.additional_features.get("idx_query") is None
          or z.additional_features["idx_query"].get(x.s) is None
      ):
          # pc_hash = hash_gpu(torch.floor(z.C).int())
          pc_hash = spf.sphash(
              torch.cat(
                  [
                      torch.floor(z.C[:, :3] / x.s).int() * x.s,
                      z.C[:, -1].int().view(-1, 1),
                  ],
                  1,
              )
          )
          sparse_hash = spf.sphash(x.C)
          idx_query = spf.sphashquery(pc_hash, sparse_hash)
          counts = spf.spcount(idx_query.int(), x.C.shape[0])
          z.additional_features["idx_query"][x.s] = idx_query
          z.additional_features["counts"][x.s] = counts
      else:
          idx_query = z.additional_features["idx_query"][x.s]
          counts = z.additional_features["counts"][x.s]
  
      inserted_feat = spf.spvoxelize(z.F, idx_query, counts)
      new_tensor = SparseTensor(inserted_feat, x.C, x.s)
      new_tensor.coord_maps = x.coord_maps
      new_tensor.kernel_maps = x.kernel_maps
  
      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 2 for calling a global function with example usage: point_to_voxel(x, z) and returns: new_tensor