code: def init_pool_generator(gens, random_seed=None, id_queue=None):
      """Initializer function for pool workers.
  
      Args:
          gens: State which should be made available to worker processes.
          random_seed: An optional value with which to seed child processes.
          id_queue: A multiprocessing Queue of worker ids.
              This is used to indicate that a worker process
              was created by Keras.
      """
      global _SHARED_SEQUENCES
      _SHARED_SEQUENCES = gens
  
      worker_proc = multiprocessing.current_process()
  
      # name isn't used for anything, but setting a more descriptive name is
      # helpful when diagnosing orphaned processes.
      worker_proc.name = f"Keras_worker_{worker_proc.name}"
  
      if random_seed is not None:
          np.random.seed(random_seed + worker_proc.ident)
  
      if id_queue is not None:
          # If a worker dies during init, the pool will just create a replacement.
          id_queue.put(worker_proc.ident, block=True, timeout=0.1)
  
imports: import multiprocessing.dummy
  import queue
  import random
  import threading
  import time
  import warnings
  import weakref
  from contextlib import closing
  import numpy
  import tree
  from keras.api_export import keras_export
  from keras.trainers.data_adapters import data_adapter_utils
  from keras.trainers.data_adapters.data_adapter import DataAdapter
label_desc: Use image node_id 5 for calling a global function with example usage: init_pool_generator(gens, random_seed, id_queue) without return types