code: def test_df_merge_sorted_index(nparts, index, ascending):
      size = 100
      df, dfs = _prepare_merge_sorted_test(
          size, nparts, index, ascending=ascending, index=True
      )
  
      expect = df.sort_index(ascending=ascending)
      result = cudf.core.reshape._merge_sorted(
          dfs, by_index=True, ascending=ascending
      )
  
      assert_eq(expect.index, result.index)
  
imports: import re
  from itertools import chain
  import numpy
  import pandas
  import pytest
  import cudf
  from cudf import melt
  from cudf.core.buffer.spill_manager import get_global_manager
  from cudf.testing._utils import ALL_TYPES, DATETIME_TYPES, NUMERIC_TYPES, assert_eq
label_desc: Use image node_id 12 for calling a global function with example usage: test_df_merge_sorted_index(nparts, index, ascending) without return types