code: def get_global_func_with_default_on_worker(
      name: Union[None, str, Callable],
      default: Callable,
  ) -> Callable:
      """Get the registered global function on the worker process.
  
      Parameters
      ----------
      name : Union[None, str, Callable]
          If given a string, retrieve the function in TVM's global registry;
          If given a python function, return it as it is;
          Otherwise, return `default`.
  
      default : Callable
          The function to be returned if `name` is None.
  
      Returns
      -------
      result : Callable
          The retrieved global function or `default` if `name` is None
      """
      if name is None:
          return default
      if callable(name):
          return name
      try:
          return get_global_func(name)
      except TVMError as error:
          raise ValueError(
              "Function '{name}' is not registered on the worker process. "
              "The build function and export function should be registered in the worker process. "
              "Note that the worker process is only aware of functions registered in TVM package, "
              "if there are extra functions to be registered, "
              "please send the registration logic via initializer."
          ) from error
  
imports: import ctypes
  import os
  import shutil
  from typing import Any, Callable, List, Optional, Union
  import numpy
  import psutil
  from tvm._ffi import get_global_func, register_func
  from tvm.error import TVMError
  from tvm.ir import Array, IRModule, Map
  from tvm.rpc import RPCSession
  from tvm.runtime import PackedFunc, String
  from tvm.tir import FloatImm, IntImm
label_desc: Use image node_id 6 for calling a global function with example usage: get_global_func_with_default_on_worker(name, default) and returns: default, name, get_global_func