code: def test_df_merge_sorted(nparts, keys, na_position, ascending):
      size = 100
      keys_1 = keys or ["timestamp"]
      # Null values NOT currently supported with Categorical data
      # or when `ascending=False`
      add_null = keys_1[0] not in ("name")
      df, dfs = _prepare_merge_sorted_test(
          size,
          nparts,
          keys_1,
          add_null=add_null,
          na_position=na_position,
          ascending=ascending,
      )
  
      expect = df.sort_values(
          keys_1, na_position=na_position, ascending=ascending
      )
      result = cudf.core.reshape._merge_sorted(
          dfs, keys=keys, na_position=na_position, ascending=ascending
      )
      if keys:
          expect = expect[keys]
          result = result[keys]
  
      assert expect.index.dtype == result.index.dtype
      assert_eq(
          expect.reset_index(drop=True), result.reset_index(drop=True)
      )
  
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 11 for calling a global function with example usage: test_df_merge_sorted(nparts, keys, na_position, ascending) without return types