we modify the Python code as follows: