code: def testInt(self):
      # Cannot use values outside -128..127 for test, because we're also
      # testing int8
      int_inputs = [0, -1, 1, -128, 127, -101, 101, -0]
      int_dtypes = [dtypes.int8, dtypes.int32, dtypes.int64]
      uint_inputs = [0, 1, 127, 255, 101]
      uint_dtypes = [dtypes.uint8, dtypes.uint32, dtypes.uint64]
      s = lambda strs: [x.decode("ascii") for x in self.evaluate(strs)]
  
      for dtypes_, inputs_ in [
          (int_dtypes, int_inputs),
          (uint_dtypes, uint_inputs),
      ]:
          for dtype in dtypes_:
              inputs = ops.convert_to_tensor(inputs_, dtype=dtype)
              result = string_ops.as_string(inputs)
              self.assertAllEqual(
                  s(result), ["%d" % x for x in inputs_]
              )
  
              result = string_ops.as_string(inputs, width=3)
              self.assertAllEqual(
                  s(result), ["%3d" % x for x in inputs_]
              )
  
              result = string_ops.as_string(inputs, width=3, fill="0")
              self.assertAllEqual(
                  s(result), ["%03d" % x for x in inputs_]
              )
  
          with self.assertRaisesOpError("scientific and shortest"):
              self.evaluate(
                  string_ops.as_string(inputs, scientific=True)
              )
  
          with self.assertRaisesOpError("scientific and shortest"):
              self.evaluate(string_ops.as_string(inputs, shortest=True))
  
          with self.assertRaisesOpError("precision not supported"):
              self.evaluate(string_ops.as_string(inputs, precision=0))
  
file_path: tensorflow/tensorflow/python/kernel_tests/strings_ops/as_string_op_test.py
imports: import numpy
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import ops
  from tensorflow.python.ops import string_ops
  from tensorflow.python.platform import test
label_desc: Use image node_id 2 for calling the AsStringOpTest obj's underlying member method code with example usage: obj.testInt() without return types