def METHOD_NAME(self, metadata):
    """Return calculated data and files for the binary request."""
    data = files = None
    icons, screenshots = self._current_binary_metadata()
    current_icon = icons[0] if icons else None
    # only icon support atm
    icon = metadata.get("icon")
    # keep original screenshots
    updated_info = screenshots
    if current_icon is None and icon is None:
        # icon unchanged, nothing to upload
        return data, files
    if icon:
        icon_hash = _media_hash(icon)
        if current_icon is None or current_icon.get("hash") != icon_hash:
            upload_icon = {
                "type": "icon",
                "hash": icon_hash,
                "key": "icon",
                "filename": icon.name,
            }
            updated_info.append(upload_icon)
            files = {"icon": icon}
        else:
            # icon unchanged, nothing to upload
            return data, files
    if not files:
        # API requires a multipart request, but we have no files to upload
        # https://github.com/requests/requests/issues/1081
        files = {"info": ("", json.dumps(updated_info))}
    else:
        data = {"info": json.dumps(updated_info)}
    return data, files