Pattern recognition in Spiking Neural Nets using Brian2

Good afternoon!

Thank you very much, I corrected my mistake.

I used this and it has solved my problem. Thank you!
But I have another problem, on the paper simulation time(training) = 15s, but when I use this, it gives killed output on my local PC, I tried to run on Colab, there was also an error like: my session crashed after using all available RAM.
Could you give me one full example of using @network_operation, I looked at Brian2 documentation, but couldn’t find a suitable approach for my case. In my situation my external input won’t change every dt=10*ms(or any other time step), my input must change "10ms after simulating the input layer, the output neurons are given an external simulation" between t=15.5 s to 25 s, Could you give a guide, please?