code: def sample(
      self,
      cond: Dict,
      uc: Union[Dict, None] = None,
      batch_size: int = 16,
      shape: Union[None, Tuple, List] = None,
      **kwargs,
  ):
      randn = torch.randn(batch_size, *shape).to(self.device)
  
      denoiser = lambda input, sigma, c: self.denoiser(
          self.model, input, sigma, c, **kwargs
      )
      samples = self.sampler(denoiser, randn, cond, uc=uc)
      return samples
  
imports: import math
  from contextlib import contextmanager
  from typing import Any, Dict, List, Optional, Tuple, Union
  import pytorch_lightning
  import torch
  from omegaconf import ListConfig, OmegaConf
  from safetensors.torch import load_file
  from torch.optim.lr_scheduler import LambdaLR
  from ..modules import UNCONDITIONAL_CONFIG
  from ..modules.autoencoding.temporal_ae import VideoDecoder
  from ..modules.diffusionmodules.wrappers import OPENAIUNETWRAPPER
  from ..modules.ema import LitEma
  from ..util import default, disabled_train, get_obj_from_str, instantiate_from_config, log_txt_as_img
label_desc: Use image node_id 15 for calling the DiffusionEngine obj's underlying member method code with example usage: obj.sample(cond, uc, batch_size, shape) and returns: samples