Here it is:
foreach package_key [apm_enabled_packages] { lang::catalog::export_package_to_files $package_key }
Let me know if you have any other questions!