def METHOD_NAME(self, metadata, force):
    """Upload the metadata to Dashboard."""
    url = f"/dev/api/snaps/{self.snap_id}/metadata"
    headers = {
        "Content-Type": "application/json",
        "Accept": "application/json",
    }
    method = "PUT" if force else "POST"
    try:
        self._request(method, url, json=metadata, headers=headers)
    except craft_store.errors.StoreServerError as store_error:
        raise StoreMetadataError(
            self.snap_name, store_error.response, metadata
        ) from store_error