code: def test_infer_index_value():
      # same range index
      index1 = pd.RangeIndex(1, 3)
      index2 = pd.RangeIndex(1, 3)
  
      ival1 = parse_index(index1)
      ival2 = parse_index(index2)
      oival = infer_index_value(ival1, ival2)
  
      assert oival.key == ival1.key
      assert oival.key == ival2.key
  
      # different range index
      index1 = pd.RangeIndex(1, 3)
      index2 = pd.RangeIndex(2, 4)
  
      ival1 = parse_index(index1)
      ival2 = parse_index(index2)
      oival = infer_index_value(ival1, ival2)
  
      assert isinstance(oival.value, IndexValue.Int64Index)
      assert oival.key != ival1.key
      assert oival.key != ival2.key
  
      # same int64 index, all unique
      index1 = pd.Index([1, 2], dtype=np.int64)
      index2 = pd.Index([1, 2], dtype=np.int64)
  
      ival1 = parse_index(index1)
      ival2 = parse_index(index2)
      oival = infer_index_value(ival1, ival2)
  
      assert isinstance(oival.value, IndexValue.Int64Index)
      assert oival.key == ival1.key
      assert oival.key == ival2.key
  
      # same int64 index, not all unique
      index1 = pd.Index([1, 2, 2], dtype=np.int64)
      index2 = pd.Index([1, 2, 2], dtype=np.int64)
  
      ival1 = parse_index(index1)
      ival2 = parse_index(index2)
      oival = infer_index_value(ival1, ival2)
  
      assert isinstance(oival.value, IndexValue.Int64Index)
      assert oival.key != ival1.key
      assert oival.key != ival2.key
  
      # different int64 index
      index1 = pd.Index([1, 2], dtype=np.int64)
      index2 = pd.Index([2, 3], dtype=np.int64)
  
      ival1 = parse_index(index1)
      ival2 = parse_index(index2)
      oival = infer_index_value(ival1, ival2)
  
      assert isinstance(oival.value, IndexValue.Int64Index)
      assert oival.key != ival1.key
      assert oival.key != ival2.key
  
      # different index type
      index1 = pd.Index([1, 2], dtype=np.int64)
      index2 = pd.Index([2.0, 3.0], dtype=np.float64)
  
      ival1 = parse_index(index1)
      ival2 = parse_index(index2)
      oival = infer_index_value(ival1, ival2)
  
      assert isinstance(oival.value, IndexValue.Float64Index)
      assert oival.key != ival1.key
      assert oival.key != ival2.key
  
      # range index and other index
      index1 = pd.RangeIndex(1, 4)
      index2 = pd.Index([2, 3, 4], dtype=np.float64)
  
      ival1 = parse_index(index1)
      ival2 = parse_index(index2)
      oival = infer_index_value(ival1, ival2)
  
      assert isinstance(oival.value, IndexValue.Float64Index)
      assert oival.key != ival1.key
      assert oival.key != ival2.key
  
      index1 = pd.DatetimeIndex([])
      index2 = pd.RangeIndex(2)
  
      ival1 = parse_index(index1)
      ival2 = parse_index(index2)
      oival = infer_index_value(ival1, ival2)
  
      assert isinstance(oival.value, IndexValue.Index)
      assert oival.key != ival1.key
      assert oival.key != ival2.key
  
imports: import operator
  from collections import OrderedDict
  from numbers import Integral
  from typing import List, Dict
  import numpy
  import pandas
  import pytest
  from ...config import option_context
  from ...core import tile
  from ...utils import Timer
  from ..core import IndexValue
  from ..initializer import DataFrame, Series, Index
  from ..utils import decide_dataframe_chunk_sizes, decide_series_chunk_size, split_monotonic_index_min_max, build_split_idx_to_origin_idx, parse_index, filter_index_value, infer_dtypes, infer_index_value, validate_axis, fetch_corner_data, make_dtypes, build_concatenated_rows_frame, merge_index_value, auto_merge_chunks, whether_to_clean_up
label_desc: Use image node_id 9 for calling a global function with example usage: test_infer_index_value() without return types