code: def _test_callback_array_thread(dtype):
      def cb(x):
          return F.to_dgl_nd(F.from_dgl_nd(x) + 1)
  
      arg = F.copy_to(F.tensor([1, 2, 3], dtype=dtype), F.ctx())
      ret = F.from_dgl_nd(
          dgl._api_internal._TestPythonCallbackThread(
              cb, F.to_dgl_nd(arg)
          )
      )
      assert np.allclose(F.asnumpy(ret), F.asnumpy(arg) + 1)
  
file_path: dgl/tests/python/common/test_ffi.py
imports: import os
  import unittest
  import backend
  import dgl
  import numpy
  import pytest
label_desc: Use image node_id 5 for calling a global function with example usage: _test_callback_array_thread(dtype) and returns: F