code: def test_tensor_numpy_roundtrip(dtype_str, arrow_type):
      dtype = np.dtype(dtype_str)
      # Casting np.float64 -> uint32 or uint64 throws a RuntimeWarning
      with warnings.catch_warnings():
          warnings.simplefilter("ignore")
          data = (100 * np.random.randn(10, 4)).astype(dtype)
      tensor = pa.Tensor.from_numpy(data)
      assert tensor.type == arrow_type
  
      repr(tensor)
  
      result = tensor.to_numpy()
      assert (data == result).all()
  
file_path: arrow/python/pyarrow/tests/test_tensor.py
imports: import os
  import sys
  import pytest
  import warnings
  import weakref
  import numpy
  import pyarrow
label_desc: Use image node_id 3 for calling a global function with example usage: test_tensor_numpy_roundtrip(dtype_str, arrow_type) without return types