modified the python to be ruby code for ruby-client examples