code: def _create_transformer_thread(transformer: IDTransformerCollection):
      """
      Create a thread for transformer.
      """
  
      def loop(transformer, input_queue, output_queue):
          while True:
              global_kjt = input_queue.get()
              if global_kjt is None:
                  break
              cache_kjt = transformer.transform(global_kjt)
              output_queue.put(cache_kjt)
  
      input_queue = queue.Queue()
      output_queue = queue.Queue()
      thread = threading.Thread(
          target=loop, args=(transformer, input_queue, output_queue)
      )
      thread.start()
      return thread, input_queue, output_queue
  
file_path: torchrec/contrib/dynamic_embedding/src/torchrec_dynamic_embedding/id_transformer_group.py
imports: import queue
  import threading
  from typing import Dict, List, Union
  from torchrec import EmbeddingBagConfig, EmbeddingConfig, KeyedJaggedTensor
  from torchrec.distributed.model_parallel import DistributedModelParallel
  from .id_transformer_collection import IDTransformerCollection
  from .ps import PSCollection
  from .utils import _get_sharded_modules_recursive
label_desc: Use image node_id 1 for calling a global function with example usage: _create_transformer_thread(transformer) and returns: thread,  input_queue,  output_queue