def run_regeneration(self, inputs: (str or list), trace=False, quiet=True):
    if isinstance(inputs, str):
        inputs = [int(v) for v in inputs.split(',')]
    p = self._amps[0]
    p.reset_core()
    for n in self._amps[1:]:
        p.connect(n.receiver)
        p = n
        p.reset_core()
    self._amps[(- 1)].connect(self._amps[0].receiver)
    threads = []
    for (a, n) in zip(self._amps, inputs):
        a.receiver(n)
        t = threading.Thread(target=a.simulate, kwargs={'trace': trace})
        threads.append(t)
        t.start()
    self._amps[0].receiver(0)
    while any((t.is_alive() for t in threads)):
        sleep(0.0001)
    self._print_log(quiet)
    return self._amps[0]._input.pop()
def run_regeneration(self, inputs: (str or list), trace=False, quiet=True):
    if isinstance(inputs, str):
        inputs = [int(v) for v in inputs.split(',')]
    p = self._amps[0]
    p.reset_core()
    for n in self._amps[1:]:
        p.connect(n.receiver)
        p = n
        p.reset_core()
    self._amps[(- 1)].connect(self._amps[0].receiver)
    threads = []
    for (a, n) in zip(self._amps, inputs):
        a.receiver(n)
        t = threading.Thread(target=a.simulate, kwargs={'trace': trace})
        threads.append(t)
        t.start()
    self._amps[0].receiver(0)
    while any((t.is_alive() for t in threads)):
        sleep(0.0001)
    self._print_log(quiet)
    return self._amps[0]._input.pop()