CodeGen4Libs: A Two-Stage Approach for Library-Oriented Code Generation | Synapse