<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_function_cfg(func, show_inst=True):
 """Return a string of the control-flow graph of the function in DOT format. If the input `func` is not a materialized function, the module containing the function is parsed to create an actual LLVM module. The `show_inst` flag controls whether the instructions of each block are printed. """

    assert func is not None
    if isinstance(func, ir.Function):
        mod = parse_assembly(str(func.module))
        func = mod.get_function(func.name)

    # Assume func is a materialized function
    with ffi.OutputString() as dotstr:
        ffi.lib.LLVMPY_WriteCFG(func, dotstr, show_inst)
        return str(dotstr)