implemented python script to get an opengm graphical model

The code needs the opengm fork  from thorsten beier
   https://github.com/DerThorsten/opengm