def assert_eigengate_implements_consistent_protocols(
    eigen_gate_type: type[ops.EigenGate],
    *,
    exponents: Sequence[value.TParamVal] = (0, 1, -1, 0.25, sympy.Symbol('s')),
    global_shifts: Sequence[float] = (0, -0.5, 0.1),
    qubit_count: int | None = None,
    ignoring_global_phase: bool = False,
    setup_code: str = 'import cirq\nimport numpy as np\nimport sympy',
    global_vals: dict[str, Any] | None = None,
    local_vals: dict[str, Any] | None = None,
    ignore_decompose_to_default_gateset: bool = False,
) -> None:
    """Checks that an EigenGate subclass is internally consistent and has a
    good __repr__."""
    # pylint: disable=unused-variable
    __tracebackhide__ = True
    # pylint: enable=unused-variable

    for exponent in exponents:
        for shift in global_shifts:
            _assert_meets_standards_helper(
                eigen_gate_type(exponent=exponent, global_shift=shift),
                ignoring_global_phase=ignoring_global_phase,
                setup_code=setup_code,
                global_vals=global_vals,
                local_vals=local_vals,
                ignore_decompose_to_default_gateset=ignore_decompose_to_default_gateset,
            )
Checks that an EigenGate subclass is internally consistent and has a
    good __repr__.
cirq-core/cirq/testing/consistent_protocols.py