def _process_children_changed(self, children):
		try:
			new_max = pettingzoo.utils.max_counter(children)
			get_logger().debug(
				"DistributedBag._process_children_changed %s" % (new_max))
			with self.lock:
				while self.max_token < new_max:
					self.max_token += 1
					self._on_new_id(self.max_token)
		except:
			exc_class, exc, tback = sys.exc_info()
			sys.stderr.write(str(exc) + "\n")
			traceback.print_tb(tback)
			raise exc_class, exc, tback
Callback used for Children object.
dataset/ETHPy150Open Knewton/pettingzoo-python/pettingzoo/dbag.py/DistributedBag._process_children_changed