{"agent":"claude","input":"This project fails on Python 3.13 with \"ModuleNotFoundError: No module named 'imghdr'\". Reproduce it on a clean Python 3.13 and record the traceback. Find every import and call of imghdr (and sndhdr, removed in the same release). For each call, describe what the result is used for: validation, choosing a file extension or content type, or branching on a format. List which formats matter to this code. Then choose a replacement and justify it. If the project already depends on Pillow, python-magic, filetype or puremagic, use that. If it has no third-party dependencies and needs only common formats, write a small local function that checks file signatures and returns the same names imghdr returned, so callers do not change. Do not add a dependency to a dependency-free project without saying so in the pull request. Whatever you choose, preserve the two behaviours callers rely on: a falsy result for data that is not an image, and the same format names. Write a table-driven test with header bytes for each supported format, a JPEG that starts with an ICC profile segment, an HTML document and empty input. Run it on Python 3.12, comparing the new code with imghdr itself and listing every difference, and on 3.13. List the formats imghdr recognised that the replacement does not. Open a pull request.","resources":[{"url":"https://github.com/your-org/your-app"}]}