def METHOD_NAME(attachment, suffix):
    """Returns attachment file contents."""
    if suffix in list(settings.THUMB_CONF):
        image_url(attachment, suffix)
        suffix = settings.THUMB_CONF.get(suffix).get("suffix")
        f = default_storage.open(get_path(attachment.media_file.name, suffix))
        return f.read()
    return attachment.media_file.read()