docstr: Tests copying a generator.
code: def testGeneratorCopy(self):
      """Tests copying a generator."""
      g = random.Generator.from_seed(0)
      g_copy = random.Generator(g)
      self.assertAllEqual(g.algorithm, g_copy.algorithm)
      self.assertAllEqual(
          g.state.read_value(), g_copy.state.read_value()
      )
      # Tests tf.function
      global g_seeded
      g_seeded = None
  
      # Do the same in tf.function
      @def_function.function
      def f():
          global g_seeded
          # defun'ed function should only create variables once
          if g_seeded is None:
              g_seeded = random.Generator(g)
          self.assertAllEqual(g.algorithm, g_seeded.algorithm)
          self.assertAllEqual(
              g.state.read_value(), g_seeded.state.read_value()
          )
  
      f()
  
imports: import os
  import re
  from absl.testing import parameterized
  import numpy
  from tensorflow.python.checkpoint import checkpoint
  from tensorflow.python.eager import context
  from tensorflow.python.eager import def_function
  from tensorflow.python.framework import config
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import errors
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import test_util
  from tensorflow.python.kernel_tests.random import util
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import gen_random_ops
  from tensorflow.python.ops import gen_stateful_random_ops
  from tensorflow.python.ops import logging_ops
  from tensorflow.python.ops import random_ops_util
  from tensorflow.python.ops import stateful_random_ops
  from tensorflow.python.ops import variables
  from tensorflow.python.platform import test
label_desc: Use image node_id 16 for calling the StatefulRandomOpsTest obj's underlying member method code with example usage: obj.testGeneratorCopy() without return types