code: def test_forward2(test_model, num_classes, url, multimodal):
      x = []
      adj_t = []
      for modality in range(test_model.num_modalities):
          data = test_model.dataset.get(modality)
          x.append(data.x[data.train_idx])
          adj_t.append(data.adj_t_train)
  
      outputs = test_model.forward(x, adj_t, multimodal)
  
      assert isinstance(outputs, list) != multimodal
      if not multimodal:
          assert len(outputs) == test_model.num_modalities
          for modality in range(test_model.num_modalities):
              assert outputs[modality].shape == (
                  test_model.dataset.get(modality).num_train,
                  test_model.num_classes,
              )
      else:
          assert isinstance(outputs, torch.Tensor)
          assert outputs.shape == (
              test_model.dataset.get(0).num_train,
              test_model.num_classes,
          )
          test_model.multimodal_decoder = None
          with pytest.raises(TypeError):
              _ = test_model.forward(x, adj_t, multimodal)
  
file_path: pykale/tests/pipeline/test_multiomics_trainer.py
imports: import pytest
  import pytorch_lightning
  import torch
  from torch.nn import CrossEntropyLoss
  from kale.embed.mogonet import MogonetGCN
  from kale.loaddata.multiomics_datasets import SparseMultiomicsDataset
  from kale.pipeline.multiomics_trainer import MultiomicsTrainer
  from kale.predict.decode import LinearClassifier, VCDN
  from kale.prepdata.tabular_transform import ToOneHotEncoding, ToTensor
  from kale.utils.seed import set_seed
label_desc: Use image node_id 4 for calling a global function with example usage: test_forward2(test_model, num_classes, url, multimodal) without return types