code: def averageVariablesNamesHelper(self, zero_debias):
      v0 = variables.Variable(10.0, name="v0")
      v1 = variables.Variable(30.0, name="v1")
      # Add a non-trainable variable.
      v2 = variables.Variable(20.0, name="v2", trainable=False)
      tensor2 = v0 + v1
      ema = moving_averages.ExponentialMovingAverage(
          0.25, zero_debias=zero_debias, name="foo"
      )
      self.assertEqual("foo", ema.name)
      self.assertEqual("v0/foo", ema.average_name(v0))
      self.assertEqual("v1/foo", ema.average_name(v1))
      self.assertEqual("add/foo", ema.average_name(tensor2))
      ema.apply([v0, v1, tensor2])
      vars_to_restore = ema.variables_to_restore()
      # vars_to_restore should contain the following:
      # {v0/foo : v0,
      #  v1/foo : v1,
      #  add/foo : add/foo,
      #  v2 : v2}
      expected_names = [
          ema.average_name(v0),
          ema.average_name(v1),
          ema.average_name(tensor2),
          v2.op.name,
      ]
      if zero_debias:
          # vars_to_restore should also contain the following:
          #  {add/foo/biased: add/foo/biased,
          #  add/foo/local_step: add/foo/local_step}
          expected_names += [
              ema.average_name(tensor2) + "/biased",
              ema.average_name(tensor2) + "/local_step",
          ]
      self.assertEqual(
          sorted(expected_names), sorted(vars_to_restore.keys())
      )
      self.assertEqual(ema.average(v0).op.name, ema.average_name(v0))
      self.assertEqual(ema.average(v1).op.name, ema.average_name(v1))
      self.assertEqual(
          ema.average(tensor2).op.name, ema.average_name(tensor2)
      )
  
imports: import numpy
  from tensorflow.python.compiler.xla.experimental import xla_sharding
  from tensorflow.python.eager import context
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import test_util
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import gen_state_ops
  from tensorflow.python.ops import variable_scope
  from tensorflow.python.ops import variables
  from tensorflow.python.platform import test
  from tensorflow.python.training import moving_averages
  from tensorflow.python.training import saver
label_desc: Use image node_id 20 for calling the ExponentialMovingAverageTest obj's underlying member method code with example usage: obj.averageVariablesNamesHelper(zero_debias) without return types