code: def test_tensor_numpy_ownership():
      arr_in = np.array([1, 2, 3])
  
      m = kp.Manager()
  
      t = m.tensor(arr_in)
  
      # This should increment refcount for tensor sharedptr
      td = t.data()
  
      assert td.base.is_init() == True
      assert np.all(td == arr_in)
  
      del t
  
      assert td.base.is_init() == True
      assert np.all(td == arr_in)
  
      m.destroy()
  
      assert td.base.is_init() == False
  
file_path: kompute/python/test/test_tensor_types.py
imports: import os
  import pytest
  import kp
  import numpy
  from .utils import compile_source
label_desc: Use image node_id 6 for calling a global function with example usage: test_tensor_numpy_ownership() without return types