code: def testRandomInitializer(self):
      # Sanity check that the slices uses a different seed when using a random
      # initializer function.
      with self.cached_session():
          (
              var0,
              var1,
          ) = partitioned_variables.create_partitioned_variables(
              [20, 12], [1, 2], init_ops.random_uniform_initializer()
          )
          self.evaluate(variables.global_variables_initializer())
          val0, val1 = (
              self.evaluate(var0).flatten(),
              self.evaluate(var1).flatten(),
          )
          self.assertTrue(np.linalg.norm(val0 - val1) > 1e-6)
      # Negative test that proves that slices have the same values if
      # the random initializer uses a seed.
      with self.cached_session():
          (
              var0,
              var1,
          ) = partitioned_variables.create_partitioned_variables(
              [20, 12],
              [1, 2],
              init_ops.random_uniform_initializer(seed=201),
          )
          self.evaluate(variables.global_variables_initializer())
          val0, val1 = (
              self.evaluate(var0).flatten(),
              self.evaluate(var1).flatten(),
          )
          self.assertAllClose(val0, val1)
  
imports: import os
  import numpy
  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 cond
  from tensorflow.python.ops import init_ops
  from tensorflow.python.ops import partitioned_variables
  from tensorflow.python.ops import random_ops
  from tensorflow.python.ops import variable_scope
  from tensorflow.python.ops import variable_v1
  from tensorflow.python.ops import variables
  from tensorflow.python.platform import test
  from tensorflow.python.training import saver
label_desc: Use image node_id 12 for calling the PartitionedVariablesTestCase obj's underlying member method code with example usage: obj.testRandomInitializer() without return types