def METHOD_NAME(operations, threshold):
    total_ms = 0
    for op in operations:
        assert len(op.qubits) <= 2
        if len(op.qubits) == 2:
            assert isinstance(op, cirq.GateOperation)
            assert isinstance(op.gate, cirq.XXPowGate)
            total_ms += abs(op.gate.exponent)
    assert total_ms <= threshold