Allow the last optimization pass to return a Function rather than a modified AST.
Allow the last optimization pass to return a Function rather than a modified AST.

IntelLabs/Sparso,IntelLabs/Sparso,IntelLabs/Sparso,IntelLabs/Sparso