from collections.abc import Callable
from typing import Any

class Mutability:
    def __init__(self, immutable: bool = False) -> None: ...
    def _require_mutable(self) -> None: ...
    def _require_immutable(self) -> None: ...
    def set_immutable(self) -> None: ...
    def is_immutable(self) -> bool: ...
    def is_mutable(self) -> bool: ...
    def __getstate__(self) -> dict[str, Any]: ...
    def __setstate__(self, state: dict[str, Any]) -> None: ...

def require_mutable(f: Callable) -> Callable: ...

def require_immutable(f: Callable) -> Callable: ...
