class_docstr: Collect all tf.Tensor object, to be evaluated by tf.Session.run()
  These objects are grouped into::
  
      NETWORK_OUTPUT: to be decoded by an aggregator
      CONSOLE: to be printed on command line
      TF_SUMMARIES: to be added to tensorboard visualisation
docstr: The last step of creating a tensorflow graph,
  new ops are added by using reduce_mean over multi-devices
docstr_tok: ["The","last","step","of","creating","a","tensorflow","graph",",","new","ops","are","added","by","using","reduce_mean","over","multi-devices"]
code: def _average_variables_over_devices(
      var_dict, create_tf_summary_op=False
  ):
      """
      The last step of creating a tensorflow graph,
      new ops are added by using reduce_mean over multi-devices
      """
      for var_name in var_dict:
          values = var_dict.get(var_name, None)
          if not isinstance(values, list):
              continue
          var_dict[var_name] = tf.reduce_mean(values, name=var_name)
          if create_tf_summary_op:
              # for the averaged variables use scalar summary only
              tf.summary.scalar(
                  name="{}_device_average_".format(var_name),
                  tensor=var_dict[var_name],
                  collections=[TF_SUMMARIES],
              )
  
imports: from __future__ import absolute_import, print_function
  import tensorflow
  from tensorflow.contrib.framework import list_variables
  from niftynet.io.misc_io import image3_axial, image3_coronal, image3_sagittal, resolve_checkpoint
  from niftynet.utilities import util_common
  from niftynet.utilities.restore_initializer import restore_initializer
label_desc: Use image node_id 9 for calling the OutputsCollector obj's underlying member method code with example usage: obj._average_variables_over_devices(var_dict, create_tf_summary_op) without return types