class_docstr: !
  @brief Local excitatory global inhibitory oscillatory network (LEGION) that uses relaxation oscillator
         based on Van der Pol model. 
         
  @details The model uses global inhibitor to de-synchronize synchronous ensembles of oscillators.
           
           CCORE option can be used to use the pyclustering core - C/C++ shared library for processing that significantly increases performance.
  
  Example:
  @code
      # Create parameters of the network
      parameters = legion_parameters();
      parameters.Wt = 4.0;
      
      # Create stimulus
      stimulus = [1, 1, 0, 0, 0, 1, 1, 1];
      
      # Create the network (use CCORE for fast solving)
      net = legion_network(len(stimulus), parameters, conn_type.GRID_FOUR, ccore = True);
      
      # Simulate network - result of simulation is output dynamic of the network
      output_dynamic = net.simulate(1000, 750, stimulus);
      
      # Draw output dynamic
      draw_dynamics(output_dynamic.time, output_dynamic.output, x_title = "Time", y_title = "x(t)");
  @endcode
class_docstr_tok: ["!","@","brief","Local","excitatory","global","inhibitory","oscillatory","network","(","LEGION",")","that","uses","relaxation","oscillator","based","on","Van","der","Pol","model",".","@","details","The","model","uses","global","inhibitor","to","de-synchronize","synchronous","ensembles","of","oscillators",".","CCORE","option","can","be","used","to","use","the","pyclustering","core","-","C\/C++","shared","library","for","processing","that","significantly","increases","performance",".","Example",":","@","code","#","Create","parameters","of","the","network","parameters","=","legion_parameters","(",")",";","parameters.Wt","=","4.0",";","#","Create","stimulus","stimulus","=","[","1",",","1",",","0",",","0",",","0",",","1",",","1",",","1","]",";","#","Create","the","network","(","use","CCORE","for","fast","solving",")","net","=","legion_network","(","len","(","stimulus",")",",","parameters",",","conn_type.GRID_FOUR",",","ccore","=","True",")",";","#","Simulate","network","-","result","of","simulation","is","output","dynamic","of","the","network","output_dynamic","=","net.simulate","(","1000",",","750",",","stimulus",")",";","#","Draw","output","dynamic","draw_dynamics","(","output_dynamic.time",",","output_dynamic.output",",","x_title","=","``","Time","''",",","y_title","=","``","x","(","t",")","''",")",";","@","endcode"]
docstr: !
  @brief Returns new value of global inhibitory
  
  @param[in] z (dobule): Current value of inhibitory.
  @param[in] t (double): Current time of simulation.
  @param[in] argv (tuple): It's not used, can be ignored.
  
  @return (double) New value if global inhibitory (not assign).
docstr_tok: ["!","@","brief","Returns","new","value","of","global","inhibitory","@","param","[","in","]","z","(","dobule",")",":","Current","value","of","inhibitory",".","@","param","[","in","]","t","(","double",")",":","Current","time","of","simulation",".","@","param","[","in","]","argv","(","tuple",")",":","It","'s","not","used",",","can","be","ignored",".","@","return","(","double",")","New","value","if","global","inhibitory","(","not","assign",")","."]
code: def _global_inhibitor_state(self, z, t, argv):
      """!
      @brief Returns new value of global inhibitory
  
      @param[in] z (dobule): Current value of inhibitory.
      @param[in] t (double): Current time of simulation.
      @param[in] argv (tuple): It's not used, can be ignored.
  
      @return (double) New value if global inhibitory (not assign).
  
      """
  
      sigma = 0.0
  
      for x in self._excitatory:
          if x > self._params.teta_zx:
              sigma = 1.0
              break
  
      return self._params.fi * (sigma - z)
  
imports: import numpy
  import random
  import pyclustering.core.legion_wrapper
  from pyclustering.core.wrapper import ccore_library
  from pyclustering.nnet import *
  from pyclustering.utils import heaviside, allocate_sync_ensembles
  from scipy.integrate import odeint
label_desc: Use image node_id 8 for calling the legion_network obj's underlying member method code with example usage: obj._global_inhibitor_state(z, t, argv) and returns: unknown