code: def get_codebook_indices(self):
      if self.codebook_indices is None:
          from itertools import product
  
          p = [range(self.num_vars)] * self.groups
          inds = list(product(*p))
          self.codebook_indices = torch.tensor(
              inds, dtype=torch.long, device=self.vars.device
          ).flatten()
  
          if not self.combine_groups:
              self.codebook_indices = self.codebook_indices.view(
                  self.num_vars**self.groups, -1
              )
              for b in range(1, self.groups):
                  self.codebook_indices[:, b] += self.num_vars * b
              self.codebook_indices = self.codebook_indices.flatten()
      return self.codebook_indices
  
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 3 for calling the GumbelVectorQuantizer obj's underlying member method code with example usage: obj.get_codebook_indices() and returns: self