parameters: (source, headers=False, testing=False)
return_statement: return "\n".join(buf) + cpp
docstring: Transpile a single python translation unit (a python script) into
      C++ 14 code.
docstring_summary: Transpile a single python translation unit (a python script) into
      C++ 14 code.
docstring_tokens: Transpile a single python translation unit ( a python script ) into C ++ 14 code .
function: def transpile(source, headers=False, testing=False):
      """
      Transpile a single python translation unit (a python script) into
      C++ 14 code.
      """
      tree = ast.parse(source)
      add_variable_context(tree)
      add_scope_context(tree)
      add_list_calls(tree)
      add_imports(tree)
  
      transpiler = CppTranspiler()
  
      buf = []
      if testing:
          buf += ['#include "catch.hpp"']
          transpiler.use_catch_test_cases = True
  
      if headers:
          buf += transpiler.headers
          buf += transpiler.usings
  
      if testing or headers:
          buf.append('')  # Force empty line
  
      cpp = transpiler.visit(tree)
      return "\n".join(buf) + cpp
function_tokens: def transpile ( source , headers = False , testing = False ) : tree = ast . parse ( source ) add_variable_context ( tree ) add_scope_context ( tree ) add_list_calls ( tree ) add_imports ( tree ) transpiler = CppTranspiler ( ) buf = [ ] if testing : buf += [ '#include "catch.hpp"' ] transpiler . use_catch_test_cases = True if headers : buf += transpiler . headers buf += transpiler . usings if testing or headers : buf . append ( '' ) # Force empty line cpp = transpiler . visit ( tree ) return "\n" . join ( buf ) + cpp