code: def test_failed_import_during_compiling(self):
      # Issue 4367
      # Decoding \N escapes requires the unicodedata module. If it can't be
      # imported, we shouldn't segfault.
  
      # This program should raise a SyntaxError in the eval.
      code = (
          "import sys;"
          "sys.modules['unicodedata'] = None;"
          """eval("'\\\\N{SOFT HYPHEN}'")"""
      )
      # We use a separate process because the unicodedata module may already
      # have been loaded in this process.
      result = script_helper.assert_python_failure("-c", code)
      error = (
          "SyntaxError: (unicode error) \\N escapes not supported "
          "(can't load unicodedata module)"
      )
      self.assertIn(error, result.err.decode("ascii"))
  
imports: import hashlib
  from http.client import HTTPException
  import sys
  import unicodedata
  import unittest
  from test.support import open_urlresource, requires_resource, script_helper, cpython_only, check_disallow_instantiation
label_desc: Use image node_id 2 for calling the UnicodeMiscTest obj's underlying member method code with example usage: obj.test_failed_import_during_compiling() without return types