code: def _reg_extension(cls, fcreate):
      global _DGL_COMPATS
      _DGL_COMPATS += (cls,)
      if fcreate:
          fret = lambda x: fcreate(_return_handle(x))
          RETURN_SWITCH[cls._dgl_tcode] = fret
          C_TO_PY_ARG_SWITCH[cls._dgl_tcode] = _wrap_arg_func(
              fret, cls._dgl_tcode
          )
  
file_path: dgl/python/dgl/_ffi/_ctypes/ndarray.py
imports: from __future__ import absolute_import
  import ctypes
  from ..base import _LIB, c_str, check_call
  from ..runtime_ctypes import DGLArrayHandle
  from .types import _return_handle, _wrap_arg_func, C_TO_PY_ARG_SWITCH, RETURN_SWITCH
label_desc: Use image node_id 4 for calling a global function with example usage: _reg_extension(cls, fcreate) without return types