def METHOD_NAME(
    msg: str,
    slack: Optional[SlackApi],
    state: State,
    state_key: str,
    state_value: Optional[str],
) -> None:
    """Check notification status, notify if needed and update the notification status"""
    if state.exists(state_key) and state.get(state_key) == state_value:
        # already notified for this state key & value
        return
    logging.info(["openshift-upgrade-watcher", msg])
    if not slack:
        return
    slack.chat_post_message(msg)
    state.add(state_key, state_value, force=True)