code: def wrap_auto_init(fn):
      @wraps(fn)
      def auto_init_wrapper(*args, **kwargs):
          auto_init_ray()
          return fn(*args, **kwargs)
  
      return auto_init_wrapper
  
imports: import ray
  import os
  from functools import wraps
  import threading
label_desc: Use image node_id 2 for calling a global function with example usage: wrap_auto_init(fn) and returns: auto_init_wrapper, fn