class_docstr: Test cases for resource variable operators.
class_docstr_tok: ["Test","cases","for","resource","variable","operators","."]
code: def testShape(self):
      for dtype in self.numeric_types:
          init = np.ones([2, 3]).astype(dtype)
          with self.session() as session, self.test_scope():
              v = resource_variable_ops.ResourceVariable(init)
              session.run(variables.variables_initializer([v]))
              h = v.handle
              s32, s64 = session.run(
                  [
                      resource_variable_ops.variable_shape(h),
                      resource_variable_ops.variable_shape(
                          h, out_type=dtypes.int64
                      ),
                  ]
              )
              self.assertEqual(s32.dtype, np.int32)
              self.assertEqual(s64.dtype, np.int64)
              self.assertAllEqual(s32, [2, 3])
              self.assertAllEqual(s64, [2, 3])
  
imports: import re
  import numpy
  from tensorflow.compiler.tests import xla_test
  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.ops import array_ops
  from tensorflow.python.ops import gen_state_ops
  from tensorflow.python.ops import init_ops
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops import resource_variable_ops
  from tensorflow.python.ops import state_ops
  from tensorflow.python.ops import variable_scope
  from tensorflow.python.ops import variables
  from tensorflow.python.platform import googletest
  from tensorflow.python.training.gradient_descent import GradientDescentOptimizer
label_desc: Use image node_id 7 for calling the VariableOpsTest obj's underlying member method code with example usage: obj.testShape() without return types