class_docstr: Class wrapping the normalizing flows so it can articulate with
  :class:`~pythae.trainers.BaseTrainer`
code: def forward(self, x: BaseDataset, **kwargs):
      x = x["data"]
  
      flow_output = self.flow(x, **kwargs)
  
      y = flow_output.out
      log_abs_det_jac = flow_output.log_abs_det_jac
  
      log_prob_prior = self.prior.log_prob(y).reshape(y.shape[0])
  
      output = ModelOutput(
          loss=-(log_prob_prior + log_abs_det_jac).sum()
      )
  
      return output
  
imports: import os
  import sys
  from copy import deepcopy
  import numpy
  import torch
  import torch.nn
  from ....data.datasets import BaseDataset
  from ...auto_model import AutoConfig
  from ...base.base_config import EnvironmentConfig
  from ...base.base_utils import ModelOutput
  from .base_nf_config import BaseNFConfig
label_desc: Use image node_id 4 for calling the NFModel obj's underlying member method code with example usage: obj.forward(x) and returns: output