code: def testPrintOneTensorLogWarning(self):
      with self.cached_session():
          tensor = math_ops.range(10)
          with self.captureWritesToStream(sys.stderr) as printed:
              print_op = logging_ops.print_v2(
                  tensor, output_stream=tf_logging.warning
              )
              self.evaluate(print_op)
          self.assertTrue("W" in printed.contents())
          expected = "[0 1 2 ... 7 8 9]"
          self.assertTrue(expected in printed.contents())
  
file_path: tensorflow-upstream/tensorflow/python/kernel_tests/logging_ops_logging_level_test.py
imports: import sys
  from tensorflow.python.framework import test_util
  from tensorflow.python.ops import logging_ops
  from tensorflow.python.ops import math_ops
  from tensorflow.python.platform import test
  from tensorflow.python.platform import tf_logging
label_desc: Use image node_id 2 for calling the PrintV2LoggingLevelTest obj's underlying member method code with example usage: obj.testPrintOneTensorLogWarning() without return types