Look at the examples in the Python Library and extrapolate from there…
And I fixed your required formatting when pasting code here…