結果 : how to reduce cyclomatic complexity in python