code: def test_array_interface() -> None:
      arr = cp.array([[1, 2, 3, 4], [1, 2, 3, 4]])
      i_arr = arr.__cuda_array_interface__
      i_arr = json.loads(json.dumps(i_arr))
      ret = xgb.core.from_array_interface(i_arr)
      np.testing.assert_equal(cp.asnumpy(arr), cp.asnumpy(ret))
  
imports: import json
  import numpy
  import pytest
  import xgboost
  from xgboost import testing
  from xgboost.testing.data import run_base_margin_info
label_desc: Use image node_id 1 for calling a global function with example usage: test_array_interface() without return types