def __init__(self, func: _IntsToIntCallable):
        """Inits _QuirkArithmeticCallable.

        Args:
            func: Maps target int to its output value based on other input ints.
        """
        self.func = func

        # The lambda parameter names indicate the input letter to match.
        letters: list[str] = list(inspect.signature(self.func).parameters)
        # The target is always first, and should be ignored.
        assert letters and letters[0] == 'x'
        self.letters = tuple(letters[1:])

        # The last argument is the modulus r for modular arithmetic.
        self.is_modular = letters[-1] == 'r'
Inits _QuirkArithmeticCallable.

        Args:
            func: Maps target int to its output value based on other input ints.
        
cirq-core/cirq/interop/quirk/cells/arithmetic_cells.py