grainy Py example