Porting the example code for HostedGraphite.com's service from Python 2 to Python 3