def _strat_has_stabilizer_effect_from_has_stabilizer_effect(val: Any) -> bool | None:
    """Infer whether val has stabilizer effect via its `_has_stabilizer_effect_` method."""
    if hasattr(val, '_has_stabilizer_effect_'):
        result = val._has_stabilizer_effect_()
        if result is not NotImplemented and result is not None:
            return result
    return None
Infer whether val has stabilizer effect via its `_has_stabilizer_effect_` method.
cirq-core/cirq/protocols/has_stabilizer_effect_protocol.py