How to add custom icon to actions via python scripting?

Maybe this plugin helps with finding out some things? I know that at least one user utilized it for the task you named.

Michelist