docstr: Tests generator creation, in both eager and tf.function.
  
  The interaction between Generator creation and defun should be the same as
  tf.Variable.
code: def testGeneratorCreation(self):
      """Tests generator creation, in both eager and tf.function.
  
      The interaction between Generator creation and defun should be the same as
      tf.Variable.
      """
      shape = [2, 3]
      alg = random.RNG_ALG_PHILOX
      for constructor in [
          lambda: random.Generator(state=[1, 2, 3], alg=alg),
          lambda: random.Generator.from_seed(1234),
          lambda: random.Generator.from_key_counter(  # pylint: disable=g-long-lambda
              key=1, counter=[2, 3], alg=alg
          ),
      ]:
          gen = constructor()
          # Tests tf.function
          expected_normal1 = gen.normal(shape)
          expected_normal2 = gen.normal(shape)
          global g_seeded
          g_seeded = None
  
          @def_function.function
          def f(constructor):
              global g_seeded
              # defun'ed function should only create variables once
              if g_seeded is None:
                  g_seeded = constructor()
              return g_seeded.normal(shape)
  
          def check_results(expected_normal, v):
              self.assertAllEqual(expected_normal, v)
  
          check_results(expected_normal1, f(constructor))
          check_results(expected_normal2, f(constructor))
  
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 11 for calling the StatefulRandomOpsTest obj's underlying member method code with example usage: obj.testGeneratorCreation() and returns: g_seeded