code: def pickle_by_value(fun):
      """
      Hints parallel external source to serialize a decorated global function by value
      rather than by reference, which would be a default behavior of Python's pickler.
      """
      if inspect.isfunction(fun):
          setattr(fun, "_dali_pickle_by_value", True)
          return fun
      else:
          raise TypeError(
              "Only functions can be explicitely set to be pickled by value"
          )
  
file_path: DALI/dali/python/nvidia/dali/pickling.py
imports: import inspect
  import pickle
  import io
  from nvidia.dali import reducers
label_desc: Use image node_id 1 for calling a global function with example usage: pickle_by_value(fun) and returns: fun