from typing import Any


def _custom_boolean_deserialization(value: Any) -> bool:
    """Deserialize a boolean, allowing for common string or int representations."""
    true_values = [1, "1", "true", "True", True]
    false_values = [0, "0", "false", "False", False]
    if value in true_values:
        return True
    elif value in false_values:
        return False
    else:
        raise ValueError(
            f"Received unexpected GraphQLBoolean value {value} of type {type(value)}. Expected one "
            f"of: {true_values + false_values}."
        )