class_docstr: Object base class
class_docstr_tok: ["Object","base","class"]
code: def __getattr__(self, name):
      if name == "handle":
          raise AttributeError(
              "'handle' is a reserved attribute name that should not be used"
          )
      ret_val = DGLValue()
      ret_type_code = ctypes.c_int()
      ret_success = ctypes.c_int()
      check_call(
          _LIB.DGLObjectGetAttr(
              self.handle,
              c_str(name),
              ctypes.byref(ret_val),
              ctypes.byref(ret_type_code),
              ctypes.byref(ret_success),
          )
      )
      if not ret_success.value:
          raise AttributeError(
              "'%s' object has no attribute '%s'"
              % (str(type(self)), name)
          )
      return RETURN_SWITCH[ret_type_code.value](ret_val)
  
file_path: dgl/python/dgl/_ffi/_ctypes/object.py
imports: from __future__ import absolute_import
  import ctypes
  from ..base import _LIB, c_str, check_call
  from ..object_generic import _set_class_object_base
  from .types import _wrap_arg_func, C_TO_PY_ARG_SWITCH, DGLValue, RETURN_SWITCH, TypeCode
label_desc: Use image node_id 2 for calling the ObjectBase obj's underlying member method code with example usage: obj.__getattr__(name) and returns: RETURN_SWITCH