code: def testCrossDevice(self, distribution):
      with distribution.scope():
          var = variables.Variable([0.0, 0.0])
          val = variables.Variable([1.0, 2.0])
          decay = 0.25
          # NOTE(josh11b): We currently generate an error if val is a PerReplica
          # value.
          assign = moving_averages.assign_moving_average(
              var, val, decay
          )
  
          self.evaluate(variables.global_variables_initializer())
          self.assertAllClose([0.0, 0.0], self.evaluate(var))
          self.evaluate(assign)
          self.assertAllClose([1.0, 2.0], self.evaluate(var))
  
imports: from absl.testing import parameterized
  from tensorflow.python.distribute import combinations
  from tensorflow.python.distribute import strategy_combinations
  from tensorflow.python.distribute import strategy_test_lib
  from tensorflow.python.distribute import test_util
  from tensorflow.python.eager import def_function
  from tensorflow.python.eager import test
  from tensorflow.python.framework import constant_op
  from tensorflow.python.ops import variables
  from tensorflow.python.training import moving_averages
label_desc: Use image node_id 4 for calling the AssignMovingAveragesTest obj's underlying member method code with example usage: obj.testCrossDevice(distribution) without return types