docstr: Test PyUnicode_AsUTF16String()
docstr_tok: ["Test","PyUnicode_AsUTF16String","(",")"]
code: def test_asutf16string(self):
      """Test PyUnicode_AsUTF16String()"""
      asutf16string = _testcapi.unicode_asutf16string
  
      for s in ["abc", "\xa1\xa2", "\u4f60\u597d", "a\U0001f600"]:
          self.assertEqual(asutf16string(s), s.encode("utf-16"))
  
      self.assertRaises(UnicodeEncodeError, asutf16string, "\ud8ff")
      self.assertRaises(TypeError, asutf16string, b"abc")
      self.assertRaises(TypeError, asutf16string, [])
  
imports: import unittest
  import sys
  from test.support import import_helper
label_desc: Use image node_id 9 for calling the CAPITest obj's underlying member method code with example usage: obj.test_asutf16string() without return types