code: def write_source_to_f(self):
      self.collect_types()
      #
      # The new module will have a _cffi_setup() function that receives
      # objects from the ffi world, and that calls some setup code in
      # the module.  This setup code is split in several independent
      # functions, e.g. one per constant.  The functions are "chained"
      # by ending in a tail call to each other.
      #
      # This is further split in two chained lists, depending on if we
      # can do it at import-time or if we must wait for _cffi_setup() to
      # provide us with the <ctype> objects.  This is needed because we
      # need the values of the enum constants in order to build the
      # <ctype 'enum'> that we may have to pass to _cffi_setup().
      #
      # The following two 'chained_list_constants' items contains
      # the head of these two chained lists, as a string that gives the
      # call to do, if any.
      self._chained_list_constants = ["((void)lib,0)", "((void)lib,0)"]
      #
      prnt = self._prnt
      # first paste some standard set of lines that are mostly '#define'
      prnt(cffimod_header)
      prnt()
      # then paste the C source given by the user, verbatim.
      prnt(self.verifier.preamble)
      prnt()
      #
      # call generate_cpy_xxx_decl(), for every xxx found from
      # ffi._parser._declarations.  This generates all the functions.
      self._generate("decl")
      #
      # implement the function _cffi_setup_custom() as calling the
      # head of the chained list.
      self._generate_setup_custom()
      prnt()
      #
      # produce the method table, including the entries for the
      # generated Python->C function wrappers, which are done
      # by generate_cpy_function_method().
      prnt("static PyMethodDef _cffi_methods[] = {")
      self._generate("method")
      prnt('  {"_cffi_setup", _cffi_setup, METH_VARARGS, NULL},')
      prnt("  {NULL, NULL, 0, NULL}    /* Sentinel */")
      prnt("};")
      prnt()
      #
      # standard init.
      modname = self.verifier.get_module_name()
      constants = self._chained_list_constants[False]
      prnt("#if PY_MAJOR_VERSION >= 3")
      prnt()
      prnt("static struct PyModuleDef _cffi_module_def = {")
      prnt("  PyModuleDef_HEAD_INIT,")
      prnt('  "%s",' % modname)
      prnt("  NULL,")
      prnt("  -1,")
      prnt("  _cffi_methods,")
      prnt("  NULL, NULL, NULL, NULL")
      prnt("};")
      prnt()
      prnt("PyMODINIT_FUNC")
      prnt("PyInit_%s(void)" % modname)
      prnt("{")
      prnt("  PyObject *lib;")
      prnt("  lib = PyModule_Create(&_cffi_module_def);")
      prnt("  if (lib == NULL)")
      prnt("    return NULL;")
      prnt("  if (%s < 0 || _cffi_init() < 0) {" % (constants,))
      prnt("    Py_DECREF(lib);")
      prnt("    return NULL;")
      prnt("  }")
      prnt("  return lib;")
      prnt("}")
      prnt()
      prnt("#else")
      prnt()
      prnt("PyMODINIT_FUNC")
      prnt("init%s(void)" % modname)
      prnt("{")
      prnt("  PyObject *lib;")
      prnt('  lib = Py_InitModule("%s", _cffi_methods);' % modname)
      prnt("  if (lib == NULL)")
      prnt("    return;")
      prnt("  if (%s < 0 || _cffi_init() < 0)" % (constants,))
      prnt("    return;")
      prnt("  return;")
      prnt("}")
      prnt()
      prnt("#endif")
  
imports: import sys
  from .None import model
  from .error import VerificationError
  from .None import _imp_emulation
label_desc: Use image node_id 8 for calling the VCPythonEngine obj's underlying member method code with example usage: obj.write_source_to_f() without return types