from collections.abc import Callable
from typing import Any
from typing_extensions import TypeAlias

_Writer: TypeAlias = Callable[[str], object]
_Processor: TypeAlias = Callable[[tuple[str, ...], tuple[Any, ...]], None]

class TagTracer:
    indent: int
    def __init__(self) -> None: ...
    def get(self, name: str) -> TagTracerSub: ...
    def setwriter(self, writer: _Writer | None) -> None: ...
    def setprocessor(self, tags: str | tuple[str, ...], processor: _Processor) -> None: ...

class TagTracerSub:
    root: TagTracer
    tags: tuple[str, ...]
    def __init__(self, root: TagTracer, tags: tuple[str, ...]) -> None: ...
    def __call__(self, *args: object) -> None: ...
    def get(self, name: str) -> TagTracerSub: ...
