code: def templateDynamicSimulationConnectionTypeTest(
      num_osc, weight, connection_type, ccore_flag
  ):
      testing_result = False
  
      for _ in range(3):
          network = sync_network(
              num_osc,
              weight,
              type_conn=connection_type,
              ccore=ccore_flag,
          )
          output_dynamic = network.simulate_dynamic(
              collect_dynamic=False
          )
          # Just current state of network is required
  
          clusters = output_dynamic.allocate_sync_ensembles(0.1)
  
          if len(clusters) != 1:
              continue
  
          testing_result = True
          break
  
      assert testing_result == True
  
file_path: pyclustering/pyclustering/nnet/tests/sync_templates.py
imports: import matplotlib
  from pyclustering.nnet import conn_type, solve_type, initial_type
  from pyclustering.nnet.sync import sync_network, sync_visualizer
label_desc: Use image node_id 4 for calling the SyncTestTemplates obj's underlying member method code with example usage: obj.templateDynamicSimulationConnectionTypeTest(num_osc, weight, connection_type, ccore_flag) without return types