code: def get_global_func(name, allow_missing=False):
      """Get a global function by name
  
      Parameters
      ----------
      name : str
          The name of the global function
  
      allow_missing : bool
          Whether allow missing function or raise an error.
  
      Returns
      -------
      func : dgl.Function
          The function to be returned, None if function is missing.
      """
      handle = FunctionHandle()
      check_call(
          _LIB.DGLFuncGetGlobal(c_str(name), ctypes.byref(handle))
      )
      if handle.value:
          return Function(handle, False)
      else:
          if allow_missing:
              return None
          else:
              raise ValueError("Cannot find global function %s" % name)
  
imports: from __future__ import absolute_import
  import ctypes
  import sys
  from .base import _FFI_MODE, _LIB, c_str, check_call, py_str, string_types
label_desc: Use image node_id 2 for calling a global function with example usage: get_global_func(name, allow_missing) and returns: Function, None