def _legion_state(self, inputs, t, argv):
index = argv;<EOL>x = inputs[<NUM_LIT:0>];  <EOL>y = inputs[<NUM_LIT:1>];  <EOL>p = inputs[<NUM_LIT:2>];  <EOL>potential_influence = heaviside(p + math.exp(-self._params.alpha * t) - self._params.teta);<EOL>dx = <NUM_LIT> * x - x ** <NUM_LIT> + <NUM_LIT> - y + self._stimulus[index] * potential_influence + self._coupling_term[index] + self._noise[index];<EOL>dy = self._params.eps * (self._params.gamma * (<NUM_LIT:1.0> + math.tanh(x / self._params.betta)) - y);<EOL>neighbors = self.get_neighbors(index);<EOL>potential = <NUM_LIT:0.0>;<EOL>for index_neighbor in neighbors:<EOL><INDENT>potential += self._params.T * heaviside(self._excitatory[index_neighbor] - self._params.teta_x);<EOL><DEDENT>dp = self._params.lamda * (<NUM_LIT:1.0> - p) * heaviside(potential - self._params.teta_p) - self._params.mu * p;<EOL>return [dx, dy, dp]<EOL>
!
        @brief Returns new values of excitatory and inhibitory parts of oscillator and potential of oscillator.

        @param[in] inputs (list): Initial values (current) of oscillator [excitatory, inhibitory, potential].
        @param[in] t (double): Current time of simulation.
        @param[in] argv (uint): Extra arguments that are not used for integration - index of oscillator.

        @return (list) New values of excitatoty and inhibitory part of oscillator and new value of potential (not assign).