Hi -

I am trying to model the Wisconsin Card Sort test (I am surprised no one has done this already). I need to count model correct responses. I am trying to get nodes to do this (simulating the external tester) and I can’t figure out how to use if-then loops within nodes. e.g. I am trying to input 2 for the first second, and then 1 thereafter. I want the 2nd node to reverse them. I get the following error: “reverse() takes 1 positional argument but 2 were given” ; I suspect the answer is trivial. Thanks

```
import nengo
import nengo.spa as spa
D = 64
model = spa.SPA()
with model:
def two_one(t):
if 0 < t < 1:
return 2
else:
return 1
node = nengo.Node(output = two_one)
def reverse():
if node.output == 2:
return 1
else:
return 2
node2 = nengo.Node(size_in = 1, size_out = 1, output = reverse)
nengo.Connection(node,node2)
```