def flow(func): '''Return a flow chart object for the function ``func``.''' fn = by(func) fc = idaapi.FlowChart(f=fn, flags=idaapi.FC_PREDS) return fc