code: def legion_simulate(
      legion_network_pointer,
      steps,
      time,
      solver,
      collect_dynamic,
      stimulus,
  ):
      ccore = ccore_library.get()
  
      c_stimulus = package_builder(stimulus, c_double).create()
  
      ccore.legion_simulate.restype = POINTER(c_void_p)
      return ccore.legion_simulate(
          legion_network_pointer,
          c_uint(steps),
          c_double(time),
          c_uint(solver),
          c_bool(collect_dynamic),
          c_stimulus,
      )
  
file_path: pyclustering/pyclustering/core/legion_wrapper.py
imports: from pyclustering.core.wrapper import *
  from pyclustering.core.pyclustering_package import pyclustering_package, package_extractor, package_builder
label_desc: Use image node_id 3 for calling a global function with example usage: legion_simulate(legion_network_pointer, steps, time, solver, collect_dynamic, stimulus) and returns: ccore