class_docstr: ## Configurations
  
  These are default configurations which can later be adjusted by passing a `dict`.
class_docstr_tok: ["#","#","Configurations","These","are","default","configurations","which","can","later","be","adjusted","by","passing","a","`","dict","`","."]
code: def sample(self):
      # Randomly pick a sample from validation dataset to encoder
      data, *_ = self.valid_dataset[
          np.random.choice(len(self.valid_dataset))
      ]
      # Add batch dimension and move it to device
      data = data.unsqueeze(1).to(self.device)
      # Sample
      self.sampler.sample(data, self.temperature)
  
imports: import math
  from typing import Optional, Tuple, Any
  import numpy
  import torch
  import torch.nn
  from matplotlib import pyplot
  from torch import optim
  from torch.utils.data import Dataset, DataLoader
  import einops
  from labml import lab, experiment, tracker, monit
  from labml_helpers.device import DeviceConfigs
  from labml_helpers.module import Module
  from labml_helpers.optimizer import OptimizerConfigs
  from labml_helpers.train_valid import TrainValidConfigs, hook_model_outputs, BatchIndex
label_desc: Use image node_id 3 for calling the Configs obj's underlying member method code with example usage: obj.sample() without return types