code: def test__combine_networks_sanity(self):
      mockd_trainer = copy(self.trainer)
      combined = mockd_trainer._combine_networks()
      self.assertTrue(len(combined.layers) == 4)
      #        self.assertTrue(len(combined.loss_weights) == 4) TODO: AttributeError: 'Functional' object has no attribute 'loss_weights' (add loss weights to custom compile?)
      #        self.assertTrue(np.all(np.array(combined.loss_weights) == [1.0, 1.0, 0.25, 0.25]))
      mockd_trainer.discriminator = None
      combined = mockd_trainer._combine_networks()
      self.assertTrue(len(combined.layers) == 3)
      #        self.assertTrue(len(combined.loss_weights) == 3) TODO: AttributeError: 'Functional' object has no attribute 'loss_weights' (add loss weights to custom compile?)
      #        self.assertTrue(np.all(np.array(combined.loss_weights) == [1.0, 0.25, 0.25]))
      mockd_trainer.feature_extractor = None
      combined = mockd_trainer._combine_networks()
      self.assertTrue(len(combined.layers) == 2)
      #        self.assertTrue(len(combined.loss_weights) == 1) TODO: AttributeError: 'Functional' object has no attribute 'loss_weights' (add loss weights to custom compile?)
      #        self.assertTrue(np.all(np.array(combined.loss_weights) == [1.0]))
      try:
          mockd_trainer.generator = None
          combined = mockd_trainer._combine_networks()
      except:
          self.assertTrue(True)
      else:
          self.assertTrue(False)
  
imports: import logging
  import os
  import shutil
  import unittest
  from copy import copy
  from pathlib import Path
  import yaml
  import numpy
  from unittest.mock import patch, Mock
  from ISR.models.cut_vgg19 import Cut_VGG19
  from ISR.models.discriminator import Discriminator
  from ISR.models.rrdn import RRDN
  from ISR.train.trainer import Trainer
label_desc: Use image node_id 5 for calling the TrainerClassTest obj's underlying member method code with example usage: obj.test__combine_networks_sanity() without return types