def METHOD_NAME(content):
    try:
        image = PILImage.open(BytesIO(content))
        image.verify()
        image.close()
        return True
    except UnidentifiedImageError:
        return False