Python String Extract Method Refactoring Example