class_docstr: If num_to_sample is provided, sample exactly
  num_to_sample points. Otherwise sample floor(pos[0] * ratio) points
class_docstr_tok: ["If","num_to_sample","is","provided",",","sample","exactly","num_to_sample","points",".","Otherwise","sample","floor","(","pos","[","0","]","*","ratio",")","points"]
code: def sample(self, pos, x=None, batch=None):
      pass
  
imports: from abc import ABC, abstractmethod
  import math
  import torch
  from torch_geometric.nn import voxel_grid
  from torch_geometric.nn.pool.consecutive import consecutive_cluster
  from torch_geometric.nn.pool.pool import pool_pos, pool_batch
  import torch_points_kernels
  from torch_points3d.utils.config import is_list
  from torch_points3d.utils.enums import ConvolutionFormat
label_desc: Use image node_id 5 for calling the BaseSampler obj's underlying member method code with example usage: obj.sample(pos, x, batch) without return types