from typing import Callable
from typing import Any
import inspect


def _inspect_signature(func: Callable[..., Any]) -> inspect.Signature:
    """Inspect function signatures, memoized because it is called very often."""
    return inspect.signature(func)