code: def test_concat():
      df1 = pd.DataFrame(np.random.rand(10, 4), columns=list("ABCD"))
      df2 = pd.DataFrame(np.random.rand(10, 4), columns=list("ABCD"))
  
      mdf1 = from_pandas(df1, chunk_size=4)
      mdf2 = from_pandas(df2, chunk_size=4)
      r = concat([mdf1, mdf2], axis="index")
  
      assert r.shape == (20, 4)
      pd.testing.assert_series_equal(r.dtypes, df1.dtypes)
  
      tiled = tile(r)
      assert tiled.nsplits == ((4, 4, 2, 4, 4, 2), (4,))
      for i, c in enumerate(tiled.chunks):
          assert c.index == (i, 0)
  
      df3 = pd.DataFrame(
          np.random.rand(10, 4),
          columns=list("ABCD"),
          index=pd.RangeIndex(10, 20),
      )
  
      mdf3 = from_pandas(df3, chunk_size=4)
      r = concat([mdf1, mdf3], axis="index")
  
      assert r.shape == (20, 4)
      pd.testing.assert_series_equal(r.dtypes, df1.dtypes)
      pd.testing.assert_index_equal(
          r.index_value.to_pandas(), pd.RangeIndex(20)
      )
  
      df4 = pd.DataFrame(
          np.random.rand(10, 4),
          columns=list("ABCD"),
          index=np.random.permutation(np.arange(10)),
      )
  
      mdf4 = from_pandas(df4, chunk_size=4)
      r = concat([mdf1, mdf4], axis="index")
  
      assert r.shape == (20, 4)
      pd.testing.assert_series_equal(r.dtypes, df1.dtypes)
      pd.testing.assert_index_equal(
          r.index_value.to_pandas(), pd.Index([], dtype=np.int64)
      )
  
      r = concat([mdf4, mdf1], axis="index")
  
      assert r.shape == (20, 4)
      pd.testing.assert_series_equal(r.dtypes, df1.dtypes)
      pd.testing.assert_index_equal(
          r.index_value.to_pandas(), pd.Index([], dtype=np.int64)
      )
  
      r = concat([mdf4, mdf4], axis="index")
  
      assert r.shape == (20, 4)
      pd.testing.assert_series_equal(r.dtypes, df1.dtypes)
      pd.testing.assert_index_equal(
          r.index_value.to_pandas(), pd.Index([], dtype=np.int64)
      )
  
      mdf1 = from_pandas(df1, chunk_size=3)
      mdf2 = from_pandas(df2, chunk_size=4)
      r = concat([mdf1, mdf2], axis="columns")
  
      assert r.shape == (10, 8)
      expected_dtypes = pd.concat([df1, df2], axis="columns").dtypes
      pd.testing.assert_series_equal(r.dtypes, expected_dtypes)
  
      tiled = tile(r)
      assert tiled.nsplits == ((3, 3, 3, 1), (3, 1, 4))
      for i, c in enumerate(tiled.chunks):
          index = (i // 3, i % 3)
          assert c.index == index
  
      df1 = pd.DataFrame(np.random.rand(10, 4), columns=list("ABCD"))
      df2 = pd.DataFrame(np.random.rand(10, 3), columns=list("ABC"))
      mdf1 = from_pandas(df1, chunk_size=3)
      mdf2 = from_pandas(df2, chunk_size=3)
      r = concat([mdf1, mdf2], join="inner")
  
      assert r.shape == (20, 3)
      tiled = tile(r)
      assert tiled.nsplits == ((3, 3, 3, 1, 3, 3, 3, 1), (3,))
  
file_path: mars/mars/dataframe/merge/tests/test_merge.py
imports: import numpy
  import pandas
  import pytest
  from ....core import tile
  from ....core.operand import OperandStage
  from ...core import IndexValue
  from ...datasource.dataframe import from_pandas
  from ..None import DataFrameMergeAlign, DataFrameMerge, concat
label_desc: Use image node_id 7 for calling a global function with example usage: test_concat() without return types