class_docstr: The PyTorch Lightning implementation of the MOGONET method, a multiomics fusion method designed for
  classification tasks.
  
  Args:
      dataset (SparseMultiomicsDataset): The input dataset created in form of :class:`~torch_geometric.data.Dataset`.
      num_modalities (int): The total number of modalities in the dataset.
      num_classes (int): The total number of classes in the dataset.
      unimodal_encoder (List[MogonetGCN]): The list of GCN encoders for each modality.
      unimodal_decoder (List[LinearClassifier]): The list of linear classifier decoders for each modality.
      loss_fn (CrossEntropyLoss): The loss function used to gauge the error between the prediction outputs and the
          provided target values.
      multimodal_decoder (VCDN, optional): The VCDN decoder used in the multiomics dataset.
          (default: ``None``)
      train_multimodal_decoder (bool, optional): Whether to train VCDN module. (default: ``True``)
      gcn_lr (float, optional): The learning rate used in the GCN module. (default: 5e-4)
      vcdn_lr (float, optional): The learning rate used in the VCDN module. (default: 1e-3)
class_docstr_tok: ["The","PyTorch","Lightning","implementation","of","the","MOGONET","method",",","a","multiomics","fusion","method","designed","for","classification","tasks",".","Args",":","dataset","(","SparseMultiomicsDataset",")",":","The","input","dataset","created","in","form","of",":","class",":","`","~torch_geometric.data.Dataset","`",".","num_modalities","(","int",")",":","The","total","number","of","modalities","in","the","dataset",".","num_classes","(","int",")",":","The","total","number","of","classes","in","the","dataset",".","unimodal_encoder","(","List","[","MogonetGCN","]",")",":","The","list","of","GCN","encoders","for","each","modality",".","unimodal_decoder","(","List","[","LinearClassifier","]",")",":","The","list","of","linear","classifier","decoders","for","each","modality",".","loss_fn","(","CrossEntropyLoss",")",":","The","loss","function","used","to","gauge","the","error","between","the","prediction","outputs","and","the","provided","target","values",".","multimodal_decoder","(","VCDN",",","optional",")",":","The","VCDN","decoder","used","in","the","multiomics","dataset",".","(","default",":","``","None","``",")","train_multimodal_decoder","(","bool",",","optional",")",":","Whether","to","train","VCDN","module",".","(","default",":","``","True","``",")","gcn_lr","(","float",",","optional",")",":","The","learning","rate","used","in","the","GCN","module",".","(","default",":","5e-4",")","vcdn_lr","(","float",",","optional",")",":","The","learning","rate","used","in","the","VCDN","module",".","(","default",":","1e-3",")"]
docstr: Compute and return the training loss.
  
  Args:
      train_batch (:class:`~torch.Tensor` | (:class:`~torch.Tensor`, ...) | [:class:`~torch.Tensor`, ...]):
          The output of your :class:`~torch.utils.data.DataLoader`. A tensor, tuple or list.
      batch_idx (``int``): Integer displaying index of this batch.
docstr_tok: ["Compute","and","return","the","training","loss",".","Args",":","train_batch","(",":","class",":","`","~torch.Tensor","`","|","(",":","class",":","`","~torch.Tensor","`",",","...",")","|","[",":","class",":","`","~torch.Tensor","`",",","...","]",")",":","The","output","of","your",":","class",":","`","~torch.utils.data.DataLoader","`",".","A","tensor",",","tuple","or","list",".","batch_idx","(","``","int","``",")",":","Integer","displaying","index","of","this","batch","."]
code: def training_step(self, train_batch, batch_idx: int):
      """Compute and return the training loss.
  
      Args:
          train_batch (:class:`~torch.Tensor` | (:class:`~torch.Tensor`, ...) | [:class:`~torch.Tensor`, ...]):
              The output of your :class:`~torch.utils.data.DataLoader`. A tensor, tuple or list.
          batch_idx (``int``): Integer displaying index of this batch.
      """
      optimizer = self.optimizers()
  
      x = []
      adj_t = []
      y = []
      sample_weight = []
      for modality in range(self.num_modalities):
          data = train_batch[modality]
          x.append(data.x[data.train_idx])
          adj_t.append(data.adj_t_train)
          y.append(data.y[data.train_idx])
          sample_weight.append(data.train_sample_weight)
  
      outputs = self.forward(x, adj_t, multimodal=False)
  
      for modality in range(self.num_modalities):
          loss = self.loss_fn(outputs[modality], y[modality])
          loss = torch.mean(torch.mul(loss, sample_weight[modality]))
          self.logger.log_metrics(
              {
                  f"train_unimodal_step_loss ({modality + 1})": loss.detach()
              },
              self.global_step,
          )
  
          optimizer[modality].zero_grad()
          self.manual_backward(loss)
          optimizer[modality].step()
  
      if (
          self.train_multimodal_decoder
          and self.multimodal_decoder is not None
      ):
          output = self.forward(x, adj_t, multimodal=True)
          multi_loss = self.loss_fn(output, y[0])
          multi_loss = torch.mean(
              torch.mul(multi_loss, sample_weight[0])
          )
          self.logger.log_metrics(
              {"train_multimodal_step_loss": multi_loss.detach()},
              self.global_step,
          )
  
          optimizer[-1].zero_grad()
          self.manual_backward(multi_loss)
          optimizer[-1].step()
  
imports: from typing import List, Optional, Union
  import pytorch_lightning
  import torch
  import torch.nn.functional
  from sklearn.metrics import accuracy_score, f1_score, roc_auc_score
  from torch import Tensor
  from torch.nn import CrossEntropyLoss, ModuleList
  from torch.optim.optimizer import Optimizer
  from torch_geometric.loader import DataLoader
  from torch_sparse import SparseTensor
  from kale.embed.mogonet import MogonetGCN
  from kale.loaddata.multiomics_datasets import SparseMultiomicsDataset
  from kale.predict.decode import LinearClassifier, VCDN
label_desc: Use image node_id 4 for calling the MultiomicsTrainer obj's underlying member method code with example usage: obj.training_step(train_batch, batch_idx) without return types