code: def init(cls, eltype, data, kdims, vdims):
      if kdims is None:
          kdims = eltype.kdims
      if vdims is None:
          vdims = eltype.vdims
  
      dimensions = [dimension_name(d) for d in kdims + vdims]
      if (isinstance(data, dict) or util.is_dataframe(data)) and all(
          d in data for d in dimensions
      ):
          dataset = [
              d if isinstance(d, np.ndarray) else np.asarray(data[d])
              for d in dimensions
          ]
          if len({d.dtype.kind for d in dataset}) > 1:
              raise ValueError(
                  "ArrayInterface expects all columns to be of the same dtype"
              )
          data = np.column_stack(dataset)
      elif isinstance(data, dict) and not all(
          d in data for d in dimensions
      ):
          dict_data = sorted(data.items())
          dataset = zip(
              *(
                  (util.wrap_tuple(k) + util.wrap_tuple(v))
                  for k, v in dict_data
              )
          )
          data = np.column_stack(list(dataset))
      elif isinstance(data, tuple):
          data = [
              d if isinstance(d, np.ndarray) else np.asarray(d)
              for d in data
          ]
          if len({d.dtype.kind for d in data}) > 1:
              raise ValueError(
                  "ArrayInterface expects all columns to be of the same dtype"
              )
          elif cls.expanded(data):
              data = np.column_stack(data)
          else:
              raise ValueError(
                  "ArrayInterface expects data to be of uniform shape."
              )
      elif isinstance(data, list) and data == []:
          data = np.empty((0, len(dimensions)))
      elif not isinstance(data, np.ndarray):
          data = np.array([], ndmin=2).T if data is None else list(data)
          try:
              data = np.array(data)
          except Exception:
              data = None
  
      if kdims is None:
          kdims = eltype.kdims
      if vdims is None:
          vdims = eltype.vdims
  
      if (
          data is None
          or data.ndim > 2
          or data.dtype.kind in ["S", "U", "O"]
      ):
          raise ValueError(
              "ArrayInterface interface could not handle input type."
          )
      elif data.ndim == 1:
          if eltype._auto_indexable_1d and len(kdims) + len(vdims) > 1:
              data = np.column_stack([np.arange(len(data)), data])
          else:
              data = np.atleast_2d(data).T
  
      return data, {"kdims": kdims, "vdims": vdims}, {}
  
imports: import numpy
  from ..None import util
  from ..dimension import dimension_name
  from ..element import Element
  from ..ndmapping import NdMapping, item_check, sorted_context
  from .interface import DataError, Interface
label_desc: Use image node_id 2 for calling the ArrayInterface obj's underlying member method code with example usage: obj.init(cls, eltype, data, kdims, vdims) and returns: data,  dict,  dict