class_docstr: Clusters points into voxels with size :attr:`size`.
  Parameters
  ----------
  size: float
      Size of a voxel (in each dimension).
  quantize_coords: bool
      If True, it will convert the points into their associated sparse coordinates within the grid and store
      the value into a new `coords` attribute
  mode: string:
      The mode can be either `last` or `mean`.
      If mode is `mean`, all the points and their features within a cell will be averaged
      If mode is `last`, one random points per cell will be selected with its associated features
class_docstr_tok: ["Clusters","points","into","voxels","with","size",":","attr",":","`","size","`",".","Parameters","--","--","--","--","--","size",":","float","Size","of","a","voxel","(","in","each","dimension",")",".","quantize_coords",":","bool","If","True",",","it","will","convert","the","points","into","their","associated","sparse","coordinates","within","the","grid","and","store","the","value","into","a","new","`","coords","`","attribute","mode",":","string",":","The","mode","can","be","either","`","last","`","or","`","mean","`",".","If","mode","is","`","mean","`",",","all","the","points","and","their","features","within","a","cell","will","be","averaged","If","mode","is","`","last","`",",","one","random","points","per","cell","will","be","selected","with","its","associated","features"]
code: def __call__(self, data):
      if isinstance(data, list):
          data = [self._process(d) for d in data]
      else:
          data = self._process(data)
      return data
  
imports: from typing import *
  import numpy
  import numpy
  import random
  import scipy
  import re
  import torch
  import logging
  import torch.nn.functional
  from torch_scatter import scatter_mean, scatter_add
  from torch_geometric.nn.pool.consecutive import consecutive_cluster
  from torch_geometric.nn import voxel_grid
  from torch_geometric.data import Data
  from torch_cluster import grid_cluster
label_desc: Use image node_id 3 for calling the GridSampling3D obj's underlying member method code with example usage: obj.__call__(data) and returns: data