code: def convert_to_object(value):
      """Convert a python value to corresponding object type.
  
      Parameters
      ----------
      value : str
          The value to be inspected.
  
      Returns
      -------
      object : Object
          The corresponding object value.
      """
      if isinstance(value, _CLASS_OBJECT_BASE):
          return value
      if isinstance(value, (list, tuple)):
          value = [convert_to_object(x) for x in value]
          return _api_internal._List(*value)
      if isinstance(value, dict):
          vlist = []
          for item in value.items():
              if not isinstance(
                  item[0], _CLASS_OBJECT_BASE
              ) and not isinstance(item[0], string_types):
                  raise ValueError(
                      "key of map must already been a container type"
                  )
              vlist.append(item[0])
              vlist.append(convert_to_object(item[1]))
          return _api_internal._Map(*vlist)
      if isinstance(value, ObjectGeneric):
          return value.asobject()
      return _api_internal._Value(value)
  
file_path: dgl/python/dgl/_ffi/object_generic.py
imports: from __future__ import absolute_import
  from numbers import Integral, Number
  from ..None import _api_internal
  from .base import string_types
label_desc: Use image node_id 2 for calling a global function with example usage: convert_to_object(value) and returns: _api_internal, value, _api_internal, _api_internal, value