Fix code in method_could_be_a_function.rst.