code: def templateSynchronousEnsemblesAllocation(
      self,
      num_osc,
      own_weight,
      neigh_weight,
      steps,
      time,
      initial_states,
      initial_outputs,
      sync_ensembles_sizes,
  ):
      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, collect_dynamic=True
      )
      ensembles = output_dynamic.allocate_sync_ensembles(0.5, 5)
  
      assert len(ensembles) == len(sync_ensembles_sizes)
  
      obtained_ensembles_sizes = [len(cluster) for cluster in ensembles]
      total_length = sum(obtained_ensembles_sizes)
  
      assert total_length == len(network)
  
      obtained_ensembles_sizes.sort()
      sync_ensembles_sizes.sort()
  
      assert obtained_ensembles_sizes == sync_ensembles_sizes
  
file_path: pyclustering/pyclustering/nnet/tests/unit/ut_hysteresis.py
imports: import unittest
  from pyclustering.nnet.hysteresis import hysteresis_network
  from pyclustering.nnet import *
  from pyclustering.utils import extract_number_oscillations
label_desc: Use image node_id 6 for calling the HysteresisUnitTest obj's underlying member method code with example usage: obj.templateSynchronousEnsemblesAllocation(num_osc, own_weight, neigh_weight, steps, time, initial_states, initial_outputs, sync_ensembles_sizes) without return types