def METHOD_NAME(self, data: Dict[Text, Any]) -> Response:
    """Send a message to a mattermost channel."""
    headers = {"Authorization": "Bearer " + self.token}
    r = requests.post(self.url + "/posts", headers=headers, data=json.dumps(data))
    if not r.status_code == 200:
        logger.error(
            f"Failed to send message to mattermost channel "
            f"{data.get('channel_id')}. Response: {r}"
        )
    return r