Debug a provided Flask application.
Asked in the Technical 1 (Coding) stage, Part 1 of a four-part coding round. Reported follow-up: create a new file that takes input and runs the Flask app.
For grading, implement the endpoint behavior as a pure function without importing Flask. Accept method, path, and query, and return {"status": integer, "json": object}. A valid GET /greet request requires a nonblank name; otherwise return the appropriate error response.
method and path are strings.query is a dictionary whose values are strings.status and json keys.def debug_flask_application(method, path, query):