Completed Python code samples [ci skip]