class_docstr: Context manager class that powers prohibit_commit.
class_docstr_tok: ["Context","manager","class","that","powers","prohibit_commit","."]
code: def _validate_commit(self, _):
      if self.expected_commit:
          self.expected_commit = False
          return
      raise RuntimeError(
          "UNEXPECTED COMMIT - THIS WILL BREAK HA LOCKS!"
      )
  
imports: from __future__ import annotations
  import contextlib
  import copy
  import datetime
  import json
  import logging
  from typing import TYPE_CHECKING, Any, Generator, Iterable, overload
  from dateutil import relativedelta
  from sqlalchemy import TIMESTAMP, PickleType, event, nullsfirst, tuple_
  from sqlalchemy.dialects import mysql
  from sqlalchemy.types import JSON, Text, TypeDecorator
  from airflow.configuration import conf
  from airflow.serialization.enums import Encoding
  from airflow.utils.timezone import make_naive, utc
label_desc: Use image node_id 2 for calling the CommitProhibitorGuard obj's underlying member method code with example usage: obj._validate_commit(_) without return types