class_docstr: A writer that understands tokens and how to format C code
class_docstr_tok: ["A","writer","that","understands","tokens","and","how","to","format","C","code"]
code: def header_guard(self, name: str) -> Iterator[None]:
      self.out.write(
          f"""
  #ifndef {name}
  #define {name}
  #ifdef __cplusplus
  extern "C" {{
  #endif
  
  """
      )
      yield
      self.out.write(
          f"""
  #ifdef __cplusplus
  }}
  #endif
  #endif /* !{name} */
  """
      )
  
file_path: cpython/Tools/cases_generator/cwriter.py
imports: import contextlib
  from lexer import Token
  from typing import TextIO, Iterator
label_desc: Use image node_id 12 for calling the CWriter obj's underlying member method code with example usage: obj.header_guard(name) without return types