class_docstr: Improved version over VectorQuantizer, can be used as a drop-in replacement. Mostly avoids costly matrix
  multiplications and allows for post-hoc remapping of indices.
code: def unmap_to_all(self, inds):
      ishape = inds.shape
      assert len(ishape) > 1
      inds = inds.reshape(ishape[0], -1)
      used = self.used.to(inds)
      if self.re_embed > self.used.shape[0]:  # extra token
          inds[inds >= self.used.shape[0]] = 0  # simply set to zero
      back = torch.gather(
          used[None, :][inds.shape[0] * [0], :], 1, inds
      )
      return back.reshape(ishape)
  
imports: from dataclasses import dataclass
  from typing import Optional
  import numpy
  import torch
  import torch.nn
  from ..utils import BaseOutput, is_torch_version
  from ..utils.torch_utils import randn_tensor
  from .activations import get_activation
  from .attention_processor import SpatialNorm
  from .unet_2d_blocks import AutoencoderTinyBlock, UNetMidBlock2D, get_down_block, get_up_block
label_desc: Use image node_id 3 for calling the VectorQuantizer obj's underlying member method code with example usage: obj.unmap_to_all(inds) and returns: back