code: def testVector(self, encoding):
      test_value = np.array(
          [ord("H"), ord("e"), ord("l"), ord("l"), ord("o")], np.int32
      )
      expected_value = "Hello".encode(encoding)
      unicode_encode_op = ragged_string_ops.unicode_encode(
          test_value, encoding
      )
      self.assertAllEqual(unicode_encode_op, expected_value)
  
      test_value = np.array(
          [ord("H"), ord("e"), 0xC3, 0xC3, 0x1F604], np.int32
      )
      expected_value = "He\xc3\xc3\U0001f604".encode(encoding)
      unicode_encode_op = ragged_string_ops.unicode_encode(
          test_value, encoding
      )
      self.assertAllEqual(unicode_encode_op, expected_value)
  
      # Single character string
      test_value = np.array([ord("H")], np.int32)
      expected_value = "H".encode(encoding)
      unicode_encode_op = ragged_string_ops.unicode_encode(
          test_value, encoding
      )
      self.assertAllEqual(unicode_encode_op, expected_value)
  
      test_value = np.array([0x1F604], np.int32)
      expected_value = "\U0001f604".encode(encoding)
      unicode_encode_op = ragged_string_ops.unicode_encode(
          test_value, encoding
      )
      self.assertAllEqual(unicode_encode_op, expected_value)
  
imports: from absl.testing import parameterized
  import numpy
  from tensorflow.python.eager import def_function
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import errors_impl
  from tensorflow.python.framework import tensor_spec
  from tensorflow.python.framework import test_util
  from tensorflow.python.ops.ragged import ragged_factory_ops
  from tensorflow.python.ops.ragged import ragged_string_ops
  from tensorflow.python.ops.ragged import ragged_tensor
  from tensorflow.python.ops.ragged import ragged_tensor_value
  from tensorflow.python.platform import test
label_desc: Use image node_id 7 for calling the UnicodeEncodeOpTest obj's underlying member method code with example usage: obj.testVector(encoding) without return types