code: def collect_results(
      self, d_loss, fake_features, g_loss, outputs_collector
  ):
      outputs_collector.add_to_collection(
          var=d_loss,
          name="d_loss",
          average_over_devices=True,
          collection=TF_SUMMARIES,
      )
      outputs_collector.add_to_collection(
          var=g_loss,
          name="g_loss",
          average_over_devices=True,
          collection=TF_SUMMARIES,
      )
      g_mean, g_var = tf.nn.moments(fake_features, axes=[0, 1, 2])
      g_var = tf.sqrt(g_var)
      outputs_collector.add_to_collection(
          var=g_mean,
          name="mean",
          average_over_devices=True,
          collection=CONSOLE,
      )
      outputs_collector.add_to_collection(
          var=g_var,
          name="var",
          average_over_devices=True,
          collection=CONSOLE,
      )
      outputs_collector.add_to_collection(
          var=g_loss,
          name="total_loss",
          average_over_devices=True,
          collection=CONSOLE,
      )
      outputs_collector.add_to_collection(
          var=g_mean,
          name="generated_mean",
          average_over_devices=False,
          collection=TF_SUMMARIES,
      )
      outputs_collector.add_to_collection(
          var=g_var,
          name="generated_variance",
          average_over_devices=False,
          collection=TF_SUMMARIES,
      )
  
imports: from __future__ import absolute_import, print_function
  import tensorflow
  from niftynet.application.base_application import BaseApplication
  from niftynet.engine.application_factory import ApplicationNetFactory
  from niftynet.engine.application_factory import OptimiserFactory
  from niftynet.engine.application_variables import CONSOLE
  from niftynet.engine.application_variables import TF_SUMMARIES
  from niftynet.engine.sampler_random_vector_v2 import RandomVectorSampler
  from niftynet.layer.convolution import ConvolutionalLayer
  from niftynet.layer.fully_connected import FullyConnectedLayer
  from niftynet.network.base_net import BaseNet
label_desc: Use image node_id 6 for calling the ToyApplication obj's underlying member method code with example usage: obj.collect_results(d_loss, fake_features, g_loss, outputs_collector) without return types