Close Method Python Definition