code: def testOutOfRangeError_Scalar(self, dtype, pos, unit):
      # Scalar/Scalar
      test_string = {
          "BYTE": b"Hello",
          "UTF8_CHAR": "H\xc3ll\U0001f604".encode("utf-8"),
      }[unit]
      position = np.array(pos, dtype)
      length = np.array(3, dtype)
      substr_op = string_ops.substr(
          test_string, position, length, unit=unit
      )
      with self.cached_session():
          with self.assertRaises(errors_impl.InvalidArgumentError):
              self.evaluate(substr_op)
  
imports: from absl.testing import parameterized
  import numpy
  from tensorflow.python.framework import errors_impl
  from tensorflow.python.framework import test_util
  from tensorflow.python.ops import string_ops
  from tensorflow.python.platform import test
label_desc: Use image node_id 8 for calling the SubstrOpTest obj's underlying member method code with example usage: obj.testOutOfRangeError_Scalar(dtype, pos, unit) without return types