code: def test_merge_small_files():
      raw = pd.DataFrame(np.random.rand(16, 4))
      df = tile(from_pandas_df(raw, chunk_size=4))
  
      chunk_size = 4 * 4 * 8
      # number of chunks < 10
      assert df is merge_small_files(df, n_sample_file=10)
      # merged_chunk_size
      assert df is merge_small_files(
          df, n_sample_file=2, merged_file_size=chunk_size + 0.1
      )
  
      df2 = merge_small_files(
          df, n_sample_file=2, merged_file_size=2 * chunk_size
      )
      assert len(df2.chunks) == 2
      assert df2.chunks[0].shape == (8, 4)
      pd.testing.assert_index_equal(
          df2.chunks[0].index_value.to_pandas(), pd.RangeIndex(8)
      )
      assert df2.chunks[1].shape == (8, 4)
      pd.testing.assert_index_equal(
          df2.chunks[1].index_value.to_pandas(), pd.RangeIndex(8, 16)
      )
      assert df2.nsplits == ((8, 8), (4,))
  
imports: import os
  import tempfile
  import shutil
  import string
  from collections import OrderedDict
  import numpy
  import pandas
  import pytest
  from ....None import tensor
  from ....config import option_context
  from ....core import tile
  from ....tests.core import require_ray
  from ....utils import lazy_import
  from ...core import IndexValue, DatetimeIndex, Int64Index, Float64Index, MultiIndex
  from ..core import merge_small_files
  from ..dataframe import from_pandas
  from ..date_range import date_range
  from ..from_records import from_records
  from ..from_tensor import dataframe_from_tensor, series_from_tensor, dataframe_from_1d_tileables
  from ..index import from_pandas, from_tileable
  from ..read_csv import read_csv, DataFrameReadCSV
  from ..read_sql import read_sql_table, read_sql_query, DataFrameReadSQL
  from ..read_raydataset import read_ray_dataset, DataFrameReadRayDataset, read_ray_mldataset, DataFrameReadMLDataset
  from ...utils import ray_deprecate_ml_dataset
  from ..series import from_pandas
label_desc: Use image node_id 13 for calling a global function with example usage: test_merge_small_files() without return types