code: def convert_to_node(value):
      """Convert a python value to corresponding node type.
  
      Parameters
      ----------
      value : str
          The value to be inspected.
  
      Returns
      -------
      node : Node
          The corresponding node value.
      """
      if isinstance(value, (_ObjectBase, NDArrayBase, PyNativeObject)):
          return value
      elif isinstance(value, Integral):
          return _api_internal._Integer(value)
      elif isinstance(value, float):
          return _api_internal._Float(value)
      elif isinstance(value, string_types):
          return _api_internal._String(value)
      elif isinstance(value, (list, tuple)):
          value = [convert_to_node(x) for x in value]
          return _api_internal._ADT(*value)
      elif isinstance(value, dict):
          vlist = []
          for item in value.items():
              if not isinstance(
                  item[0], (_ObjectBase, NDArrayBase, PyNativeObject)
              ) 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_node(item[1]))
          return _api_internal._Map(*vlist)
      raise ValueError(
          f"don't know how to convert type {type(value)} to node"
      )
  
imports: from numbers import Number, Integral
  from ..None import _api_internal
  from ..ndarray._internal import NDArrayBase
  from .object import _ObjectBase, PyNativeObject, _set_node_generic
  from .base import string_types
label_desc: Use image node_id 2 for calling a global function with example usage: convert_to_node(value) and returns: value, _api_internal, _api_internal, _api_internal, _api_internal, _api_internal