[CORE] Add new/free function for flow graph