class_docstr: ## Base class for sampling algorithms
docstr: ### Sample from $q(x_t|x_0)$
  
  :param x0: is $x_0$ of shape `[batch_size, channels, height, width]`
  :param index: is the time step $t$ index
  :param noise: is the noise, $\epsilon$
code: def q_sample(
      self,
      x0: torch.Tensor,
      index: int,
      noise: Optional[torch.Tensor] = None,
  ):
      """
      ### Sample from $q(x_t|x_0)$
  
      :param x0: is $x_0$ of shape `[batch_size, channels, height, width]`
      :param index: is the time step $t$ index
      :param noise: is the noise, $\epsilon$
      """
      raise NotImplementedError()
  
file_path: annotated_deep_learning_paper_implementations/labml_nn/diffusion/stable_diffusion/sampler/__init__.py
imports: from typing import Optional, List
  import torch
  from labml_nn.diffusion.stable_diffusion.latent_diffusion import LatentDiffusion
label_desc: Use image node_id 5 for calling the DiffusionSampler obj's underlying member method code with example usage: obj.q_sample(x0, index, noise) without return types