Python: Procedure definition