docstr: Test if requested dtype is honored in the getter.
      
docstr_tok: ["Test","if","requested","dtype","is","honored","in","the","getter","."]
code: def testRequestedDType(self):
      """Test if requested dtype is honored in the getter."""
      with bfloat16.bfloat16_scope() as scope:
          v1 = variable_scope.get_variable("v1", [])
          self.assertEqual(v1.dtype.base_dtype, dtypes.float32)
          v2 = variable_scope.get_variable(
              "v2", [], dtype=dtypes.bfloat16
          )
          self.assertEqual(v2.dtype.base_dtype, dtypes.bfloat16)
          self.assertEqual(
              [dtypes.float32, dtypes.float32],
              [v.dtype.base_dtype for v in scope.global_variables()],
          )
  
file_path: tensorflow-upstream/tensorflow/python/tpu/bfloat16_test.py
imports: from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import test_util
  from tensorflow.python.ops import variable_scope
  from tensorflow.python.platform import test
  from tensorflow.python.tpu import bfloat16
  from tensorflow.python.framework import ops
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops import variables
label_desc: Use image node_id 4 for calling the BFloat16ScopeTest obj's underlying member method code with example usage: obj.testRequestedDType() without return types