code: def test_index_reduction(setup, check_ref_counts):
      rs = np.random.RandomState(0)
      data = pd.Index(rs.randint(0, 5, (100,)))
      data2 = pd.Index(rs.randint(1, 6, (100,)))
  
      for method in ["min", "max", "all", "any"]:
          idx = md.Index(data)
          result = getattr(idx, method)().execute().fetch()
          assert result == getattr(data, method)()
  
          idx = md.Index(data, chunk_size=10)
          result = getattr(idx, method)().execute().fetch()
          assert result == getattr(data, method)()
  
          idx = md.Index(data2)
          result = getattr(idx, method)().execute().fetch()
          assert result == getattr(data2, method)()
  
          idx = md.Index(data2, chunk_size=10)
          result = getattr(idx, method)().execute().fetch()
          assert result == getattr(data2, method)()
  
imports: from typing import NamedTuple
  import numpy
  import pytest
  import pandas
  from ....None import dataframe
  from ....config import option_context
  from ....session import get_default_session
  from ....tests.core import require_cudf, require_cupy
  from ....utils import lazy_import, pd_release_version
  from ...None import CustomReduction, NamedAgg
  from ...base import to_gpu
label_desc: Use image node_id 16 for calling a global function with example usage: test_index_reduction(setup, check_ref_counts) without return types