code: def to_codebook_index(self, indices):
      res = indices.new_full(indices.shape[:-1], 0)
      for i in range(self.groups):
          exponent = self.groups - i - 1
          res += indices[..., i] * (self.num_vars**exponent)
      return res
  
file_path: fairseq/fairseq/modules/gumbel_vector_quantizer.py
imports: import torch
  import torch.nn
  import torch.nn.functional
label_desc: Use image node_id 6 for calling the GumbelVectorQuantizer obj's underlying member method code with example usage: obj.to_codebook_index(indices) and returns: res