Debug a provided Flask app.
Asked in the Technical 1 (Coding) stage. Implement the corrected behavior as a pure Python function that processes HTTP-style request objects without importing Flask.
The function receives a list of dictionaries with method, path, and json fields and returns response dictionaries containing status and body. Support POST /items, GET /items, and GET /items/<id>. Names must be non-empty strings after trimming, IDs start at 1, and invalid names return status 400.
def debug_flask_app(requests):