For remote/distributed testing/deployment, what Tatu suggested about remote library interface is good. The other option is to use Selenium WebDriver API (around the tooling, e.g. ImageHorizonLibrary/pyAutoGUI) and hook into Selenium Grid with that to offer a scalable remote interface across nodes. Both options however, do not support nodes that you can't run custom software on (e.g. SauceLabs, etc.) only on nodes where you have control like an internal Selenium Grid setup.
For remote library interface, the easy approach is to run python remote server to serve ImageHorizonLibrary, but you'll need to know which node the browser test runs on so you can run this on same node. Here's a sample tip on how to figure out what node a selenium grid test runs on:
https://gist.github.com/krmahadevan/1766772