code: def testSurrogates(self):
      # Test correct surrogate handling.
      message = json_format_proto3_pb2.TestMessage()
      json_format.Parse('{"stringValue": "\\uD83D\\uDE01"}', message)
      self.assertEqual(
          message.string_value,
          b"\xF0\x9F\x98\x81".decode("utf-8", "strict"),
      )
  
      # Error case: unpaired high surrogate.
      self.CheckError(
          '{"stringValue": "\\uD83D"}',
          r"Invalid \\uXXXX escape|Unpaired.*surrogate",
      )
  
      # Unpaired low surrogate.
      self.CheckError(
          '{"stringValue": "\\uDE01"}',
          r"Invalid \\uXXXX escape|Unpaired.*surrogate",
      )
  
imports: import json
  import math
  import sys
  from google.protobuf import any_pb2
  from google.protobuf import duration_pb2
  from google.protobuf import field_mask_pb2
  from google.protobuf import struct_pb2
  from google.protobuf import timestamp_pb2
  from google.protobuf import wrappers_pb2
  from google.protobuf.internal import well_known_types
  from google.protobuf import json_format
  from google.protobuf.util import json_format_proto3_pb2
label_desc: Use image node_id 9 for calling the JsonFormatTest obj's underlying member method code with example usage: obj.testSurrogates() without return types