docstr: Tests that RNG can be properly advanced in cross-replica context.
docstr_tok: ["Tests","that","RNG","can","be","properly","advanced","in","cross-replica","context","."]
code: def testCrossReplica(self, strat):
      """Tests that RNG can be properly advanced in cross-replica context."""
  
      def read_values(dv):
          return [
              v.read_value()
              for v in strat.experimental_local_results(dv)
          ]
  
      with strat.scope():
          g = rng.Generator.from_seed(1)
          s1 = read_values(g.state)
          g.normal([3])
          g.skip(4)
          s2 = read_values(g.state)
      self.assertNotAllEqual(s1[0], s2[0])
      self.assertEqual(len(s1), len(s2))
      for i in range(1, len(s1)):
          self.assertAllEqual(s1[0], s1[i])
          self.assertAllEqual(s2[0], s2[i])
  
imports: import functools
  import os
  from absl.testing import parameterized
  from tensorflow.python.checkpoint import checkpoint
  from tensorflow.python.compat import v2_compat
  from tensorflow.python.distribute import combinations
  from tensorflow.python.distribute import multi_process_runner
  from tensorflow.python.distribute import sharded_variable
  from tensorflow.python.distribute import strategy_combinations
  from tensorflow.python.distribute import values
  from tensorflow.python.distribute.coordinator import cluster_coordinator
  from tensorflow.python.distribute.mirrored_strategy import MirroredStrategy
  from tensorflow.python.eager import def_function
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import test_combinations
  from tensorflow.python.framework import test_util
  from tensorflow.python.module import module
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import array_ops_stack
  from tensorflow.python.ops import stateful_random_ops
  from tensorflow.python.platform import test
  from tensorflow.python.saved_model import load
  from tensorflow.python.saved_model import save
  from tensorflow.python.util import deprecation
label_desc: Use image node_id 5 for calling the GeneratorTest obj's underlying member method code with example usage: obj.testCrossReplica(strat) and returns: unknown