code: def template_dynamic_legion(
      num_osc,
      steps,
      time,
      conn_type,
      stimulus,
      params=None,
      separate_repr=True,
      ccore_flag=True,
  ):
      net = legion_network(num_osc, params, conn_type, ccore=ccore_flag)
      print("Created")
  
      dynamic = net.simulate(
          steps, time, stimulus, solution=solve_type.RK4
      )
      print("Simulated")
  
      draw_dynamics(
          dynamic.time,
          dynamic.output,
          x_title="Time",
          y_title="x(t)",
          separate=separate_repr,
      )
      draw_dynamics(
          dynamic.time,
          dynamic.inhibitor,
          x_title="Time",
          y_title="z(t)",
      )
  
      ensembles = dynamic.allocate_sync_ensembles(0.1)
      print(ensembles)
  
file_path: pyclustering/pyclustering/nnet/examples/legion_examples.py
imports: from pyclustering.utils import draw_dynamics
  from pyclustering.nnet.legion import legion_network, legion_parameters
  from pyclustering.nnet import *
label_desc: Use image node_id 1 for calling a global function with example usage: template_dynamic_legion(num_osc, steps, time, conn_type, stimulus, params, separate_repr, ccore_flag) without return types