code: def test_arrow_list_functions():
      lst = np.array(
          [["a, bc"], ["de"], ["e", "ee"], ["中文", "中文2"]], dtype=object
      )
      has_na_lst = lst.copy()
      has_na_lst[1] = None
  
      for pandas_only in [False, True]:
          with option_context(
              {"dataframe.arrow_array.pandas_only": pandas_only}
          ):
              arrow_array = ArrowListArray(lst)
              has_na_arrow_array = ArrowListArray(has_na_lst)
  
              # getitem, scalar
              assert arrow_array[1] == lst[1]
              assert list(arrow_array[-1]) == lst[-1]
              # getitem, slice
              np.testing.assert_array_equal(
                  arrow_array[:2].to_numpy(), lst[:2]
              )
  
              # setitem
              arrow_array2 = arrow_array.copy()
              lst2 = lst.copy()
              for s in [["ss"], pd.Series(["ss"])]:
                  arrow_array2[0] = s
                  lst2[0] = ["ss"]
                  np.testing.assert_array_equal(
                      arrow_array2.to_numpy(), lst2
                  )
              arrow_array2[0] = None
              lst2[0] = None
              np.testing.assert_array_equal(
                  arrow_array2.to_numpy(), lst2
              )
              with pytest.raises(ValueError):
                  # must set list like object
                  arrow_array2[0] = "ss"
  
              # test to_numpy
              np.testing.assert_array_equal(arrow_array.to_numpy(), lst)
              np.testing.assert_array_equal(
                  arrow_array.to_numpy(copy=True), lst
              )
              np.testing.assert_array_equal(
                  has_na_arrow_array.to_numpy(na_value=1),
                  pd.Series(has_na_lst).fillna(1).to_numpy(),
              )
  
              # test fillna
              if not pandas_only:
                  arrow_array3 = has_na_arrow_array.fillna(lst[1])
                  np.testing.assert_array_equal(
                      arrow_array3.to_numpy(), lst
                  )
  
              # test astype
              with pytest.raises(TypeError):
                  arrow_array.astype(np.int64)
              with pytest.raises(TypeError):
                  arrow_array.astype(ArrowListDtype(np.int64))
              arrow_array4 = ArrowListArray([[1, 2], [3]])
              expected = np.array([["1", "2"], ["3"]], dtype=object)
              np.testing.assert_array_equal(
                  arrow_array4.astype(ArrowListDtype(str)), expected
              )
              np.testing.assert_array_equal(
                  arrow_array4.astype(
                      ArrowListDtype(arrow_array4.dtype)
                  ),
                  arrow_array4,
              )
              np.testing.assert_array_equal(
                  arrow_array4.astype(
                      ArrowListDtype(arrow_array4.dtype), copy=False
                  ),
                  arrow_array4,
              )
  
              # test nbytes
              assert arrow_array.nbytes < pd.Series(lst).memory_usage(
                  deep=True
              )
  
              # test memory_usage
              if not pandas_only:
                  assert (
                      arrow_array.memory_usage(deep=True)
                      == arrow_array.nbytes
                  )
  
              # test isna
              np.testing.assert_array_equal(
                  has_na_arrow_array.isna(),
                  pd.Series(has_na_lst).isna(),
              )
  
              # test take
              assert list(arrow_array.take([1, 2, -1])) == list(
                  pd.Series(lst).take([1, 2, -1])
              )
  
              # test shift
              assert (
                  list(arrow_array.shift(2, fill_value=["aa"]))
                  == [["aa"]] * 2 + lst[:-2].tolist()
              )
  
              # test all any
              if _use_bool_any_all:
                  assert arrow_array.all() == pd.array(lst).all()
                  assert arrow_array.any() == pd.array(lst).any()
              else:
                  assert arrow_array.all() == lst.all()
                  assert arrow_array.any() == lst.any()
  
              # test repr
              assert "ArrowListArray" in repr(arrow_array)
  
              # test concat empty
              arrow_array5 = ArrowListArray(
                  pa.chunked_array([], type=pa.list_(pa.string()))
              )
              concatenated = ArrowListArray._concat_same_type(
                  [arrow_array5, arrow_array5]
              )
              if not pandas_only:
                  assert len(concatenated._arrow_array.chunks) == 1
              pd.testing.assert_series_equal(
                  pd.Series(arrow_array5), pd.Series(concatenated)
              )
  
file_path: mars/mars/dataframe/tests/test_arrays.py
imports: import numpy
  import pandas
  import pytest
  from ...config import option_context
  from ...core import enter_mode
  from ..None import ArrowStringDtype, ArrowStringArray, ArrowListDtype, ArrowListArray
  from ..arrays import _use_bool_any_all
  from ..utils import arrow_table_to_pandas_dataframe
label_desc: Use image node_id 5 for calling a global function with example usage: test_arrow_list_functions() without return types