def METHOD_NAME(flags):
    """Extract the function definitions from deltachat.h.
    This creates a .h file with a single `#include <deltachat.h>` line
    in it.  It then runs the C preprocessor to create an output file
    which contains all function definitions found in `deltachat.h`.
    """
    distutils.log.set_verbosity(distutils.log.INFO)
    cc = distutils.ccompiler.new_compiler(force=True)
    distutils.sysconfig.customize_compiler(cc)
    tmpdir = tempfile.mkdtemp()
    try:
        src_name = os.path.join(tmpdir, "include.h")
        dst_name = os.path.join(tmpdir, "expanded.h")
        with open(src_name, "w") as src_fp:
            src_fp.write("#include <deltachat.h>")
        cc.preprocess(
            source=src_name,
            output_file=dst_name,
            include_dirs=flags["include_dirs"],
            macros=[("PY_CFFI", "1")],
        )
        with open(dst_name, "r") as dst_fp:
            return dst_fp.read()
    finally:
        shutil.rmtree(tmpdir)