@staticmethod
def _validate_error_behavior(error_behavior: str) ->None:
    """Validate that a specified error behavior is supported."""
    if error_behavior not in {'raise', 'warn'}:
        raise ValueError("error_behavior must be 'raise' or 'warn'.")
