def METHOD_NAME(self, payload: EventPayload) -> AlertGroup | None:
    """
    Get AlertGroup instance from message data in payload. It's similar to _get_alert_group_from_action,
    but it tries to get alert_group_pk from ANY button in the message, not just the one that was clicked.
    """
    try:
        # sometimes message is in "original_message" field, not "message"
        message = payload.get("message") or payload["original_message"]
        elements = message["attachments"][0]["blocks"][0]["elements"]
    except (KeyError, IndexError):
        return None
    for element in elements:
        value_string = element.get("value")
        if not value_string:
            continue
        try:
            value = json.loads(value_string)
        except (TypeError, json.JSONDecodeError):
            continue
        try:
            alert_group_pk = value["alert_group_pk"]
        except (KeyError, TypeError):
            continue
        return AlertGroup.objects.get(pk=alert_group_pk)
    return None