code: def sample(self, sample_shape=torch.Size(), cond=None):
      if cond is not None:
          shape = cond.shape[:-1]
      else:
          shape = sample_shape
  
      u = self.base_dist.sample(shape)
      sample, _ = self.inverse(u, cond)
      return sample
  
imports: import copy
  import math
  import torch
  import torch.nn
  import torch.nn.functional
  from torch.distributions import Normal
label_desc: Use image node_id 8 for calling the Flow obj's underlying member method code with example usage: obj.sample(sample_shape, cond) and returns: sample