code: def template_dynamic(
      num_osc,
      own_weight=-3,
      neigh_weight=-1,
      initial_states=None,
      initial_outputs=None,
      steps=1000,
      time=10,
  ):
      network = hysteresis_network(num_osc, own_weight, neigh_weight)
  
      if initial_states is not None:
          network.states = initial_states
  
      if initial_outputs is not None:
          network.outputs = initial_outputs
  
      output_dynamic = network.simulate(steps, time)
      hysteresis_visualizer.show_output_dynamic(output_dynamic)
  
      ensembles = output_dynamic.allocate_sync_ensembles(
          tolerance=0.5, threshold_steps=5
      )
      print(
          "Allocated synchronous ensembles ( amout:",
          len(ensembles),
          "):",
          ensembles,
      )
  
file_path: pyclustering/pyclustering/nnet/examples/hysteresis_examples.py
imports: from pyclustering.nnet.hysteresis import hysteresis_network, hysteresis_visualizer
  from pyclustering.nnet import *
label_desc: Use image node_id 1 for calling a global function with example usage: template_dynamic(num_osc, own_weight, neigh_weight, initial_states, initial_outputs, steps, time) without return types