code: def test_leak1():
      data = [
          pa.array(np.concatenate([np.random.randn(100000)] * 1000))
      ]
      table = pa.Table.from_arrays(data, ["foo"])
  
      def func():
          table.to_pandas()
  
      assert_does_not_leak(func)
  
file_path: arrow/python/scripts/test_leak.py
imports: import pyarrow
  import numpy
  import pandas
  from pyarrow.tests.util import rands
  import memory_profiler
  import gc
  import io
label_desc: Use image node_id 2 for calling a global function with example usage: test_leak1() without return types