def METHOD_NAME(goto_binary, fyle, target_folder):
    fyle = os.path.normpath(fyle)
    with TemporaryDirectory() as tmpdir:
        module = get_module_name(fyle)
        header_file = "{}_datastructure.h".format(module)
        drop_header_cmd = ["goto-instrument",
                           "--dump-c-type-header",
                           module,
                           goto_binary,
                           header_file]
        res = subprocess.run(drop_header_cmd,
                             stdout=subprocess.PIPE,
                             stderr=subprocess.STDOUT,
                             universal_newlines=True,
                             cwd=tmpdir)
        if res.returncode:
            logging.error("Dumping type header for file '%s' failed", fyle)
            logging.error("The command `%s` returned %s",
                          drop_header_cmd,
                          res.stdout)
            logging.error("The return code is %d", int(res.returncode))
            sys.exit(1)
        header = os.path.normpath(os.path.join(tmpdir, header_file))
        collected = collect_defines(fyle)
        logging.debug("Dumping the following header file to '%s':\n%s\n"
                      "// END GENERATED HEADER FILE", header, collected)
        with open(header, "a") as out:
            print(collected, file=out)
        target_file = os.path.normpath(os.path.join(target_folder, header_file))
        shutil.move(header, target_file)