def _strat_has_unitary_from_decompose(val: Any) -> bool | None:
    """Attempts to infer a value's unitary-ness via its _decompose_ method."""
    operations, _, _ = _try_decompose_into_operations_and_qubits(val)
    if operations is None:
        return None
    return all(has_unitary(op) for op in operations)
Attempts to infer a value's unitary-ness via its _decompose_ method.
cirq-core/cirq/protocols/has_unitary_protocol.py