Polymer-stabilized palladium nanoparticles for catalytic membranes: ad hoc polymer fabrication