code: def sample(self, sample_shape=torch.Size(), cond=None):
      if cond is not None:
          shape = cond.shape[:-1] + (self.input_size,)
          # TODO reshape cond to (B*T, 1, -1)
      else:
          shape = sample_shape
      x_hat = self.p_sample_loop(
          shape, cond
      )  # TODO reshape x_hat to (B,T,-1)
  
      if self.scale is not None:
          x_hat *= self.scale
      return x_hat
  
imports: from functools import partial
  from inspect import isfunction
  import numpy
  import torch
  from torch import nn, einsum
  import torch.nn.functional
label_desc: Use image node_id 10 for calling the GaussianDiffusion obj's underlying member method code with example usage: obj.sample(sample_shape, cond) and returns: x_hat