def _strat_has_stabilizer_effect_from_gate(val: Any) -> bool | None:
    """Infer whether val's gate has stabilizer effect via the _has_stabilizer_effect_ method."""
    if hasattr(val, 'gate'):
        return _strat_has_stabilizer_effect_from_has_stabilizer_effect(val.gate)
    return None
Infer whether val's gate has stabilizer effect via the _has_stabilizer_effect_ method.
cirq-core/cirq/protocols/has_stabilizer_effect_protocol.py