code: def encode_pyunicode_string(s):
      """Create Py_UNICODE[] representation of a given unicode string."""
      s = list(map(ord, s)) + [0]
  
      if sys.maxunicode >= 0x10000:  # Wide build or Py3.3
          utf16, utf32 = [], s
          for code_point in s:
              if code_point >= 0x10000:  # outside of BMP
                  high, low = divmod(code_point - 0x10000, 1024)
                  utf16.append(high + 0xD800)
                  utf16.append(low + 0xDC00)
              else:
                  utf16.append(code_point)
      else:
          utf16, utf32 = s, []
          for code_unit in s:
              if (
                  0xDC00 <= code_unit <= 0xDFFF
                  and utf32
                  and 0xD800 <= utf32[-1] <= 0xDBFF
              ):
                  high, low = utf32[-1], code_unit
                  utf32[-1] = (
                      ((high & 0x3FF) << 10) + (low & 0x3FF) + 0x10000
                  )
              else:
                  utf32.append(code_unit)
  
      if utf16 == utf32:
          utf16 = []
      return ",".join(map(_unicode, utf16)), ",".join(
          map(_unicode, utf32)
      )
  
imports: from __future__ import absolute_import
  import re
  import sys
label_desc: Use image node_id 10 for calling a global function with example usage: encode_pyunicode_string(s) and returns: str,  str