corrected python API example