code: def assertSyntaxError(
      self,
      code,
      *,
      lineno=1,
      message=TOP_LEVEL_MSG,
      offset=1,
      parametrize_docstring=True,
  ):
      code = dedent(code.lstrip("\n"))
      for add_docstring in (
          [False, True] if parametrize_docstring else [False]
      ):
          with self.subTest(code=code, add_docstring=add_docstring):
              if add_docstring:
                  code = '"""Docstring"""\n' + code
                  lineno += 1
              with self.assertRaises(SyntaxError) as cm:
                  exec(code)
              self.check_syntax_error(
                  cm.exception,
                  "<string>",
                  lineno=lineno,
                  message=message,
                  offset=offset,
              )
  
imports: import __future__
  import ast
  import unittest
  from test.support import import_helper
  from test.support.script_helper import spawn_python, kill_python
  from textwrap import dedent
  import os
  import re
  import sys
label_desc: Use image node_id 2 for calling the FutureTest obj's underlying member method code with example usage: obj.assertSyntaxError(code) without return types