code: def test_invalid_dtype(self):
      with ops.Graph().as_default() as g:
          self.assertIsNone(training_util.get_global_step())
          variable_v1.VariableV1(
              0.0,
              trainable=False,
              dtype=dtypes.float32,
              name=ops.GraphKeys.GLOBAL_STEP,
              collections=[ops.GraphKeys.GLOBAL_STEP],
          )
          self.assertRaisesRegex(
              TypeError,
              "does not have integer type",
              training_util.get_global_step,
          )
      self.assertRaisesRegex(
          TypeError,
          "does not have integer type",
          training_util.get_global_step,
          g,
      )
  
file_path: tensorflow/tensorflow/python/training/training_util_test.py
imports: from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import ops
  from tensorflow.python.ops import variable_v1
  from tensorflow.python.platform import test
  from tensorflow.python.training import monitored_session
  from tensorflow.python.training import training_util
label_desc: Use image node_id 2 for calling the GlobalStepTest obj's underlying member method code with example usage: obj.test_invalid_dtype() without return types