code: def get_codebook_indices(self, images):
      img = self.norm(images)
      logits = self.encoder(img).permute(
          (0, 2, 3, 1) if len(img.shape) == 4 else (0, 2, 1)
      )
      sampled, codes, _ = self.codebook(logits)
      self.log_codes(codes)
      return codes
  
imports: import functools
  from math import sqrt
  import torch
  import torch.distributed
  import torch.nn
  import torch.nn.functional
  import torchaudio
  from einops import rearrange
label_desc: Use image node_id 4 for calling the DiscreteVAE obj's underlying member method code with example usage: obj.get_codebook_indices(images) and returns: codes