code: def test_setitem(setup):
      data = pd.DataFrame(
          np.random.rand(10, 5),
          columns=["c" + str(i) for i in range(5)],
          index=["i" + str(i) for i in range(10)],
      )
      data2 = np.random.rand(10)
      data3 = np.random.rand(10, 2)
      df = md.DataFrame(data, chunk_size=3)
  
      df["c3"] = df["c3"] + 1
      df["c10"] = 10
      df[4] = mt.tensor(data2, chunk_size=4)
      df["d1"] = df["c4"].mean()
      df["e1"] = data2 * 2
  
      result = df.execute().fetch()
      expected = data.copy()
      expected["c3"] = expected["c3"] + 1
      expected["c10"] = 10
      expected[4] = data2
      expected["d1"] = data["c4"].mean()
      expected["e1"] = data2 * 2
      pd.testing.assert_frame_equal(result, expected)
  
      # test set multiple cols with scalar
      df = md.DataFrame(data, chunk_size=3)
      df[["c0", "c2"]] = 1
      df[["c1", "c10"]] = df["c4"].mean()
      df[["c11", "c12"]] = mt.tensor(data3, chunk_size=4)
  
      result = df.execute().fetch()
      if not _allow_set_missing_list:
          expected = data.copy().reindex(
              ["c" + str(i) for i in range(5)] + ["c10", "c11", "c12"],
              axis=1,
          )
      else:
          expected = data.copy()
      expected[["c0", "c2"]] = 1
      expected[["c1", "c10"]] = expected["c4"].mean()
      expected[["c11", "c12"]] = data3
      pd.testing.assert_frame_equal(result, expected)
  
      # test set multiple rows
      df = md.DataFrame(data, chunk_size=3)
      df[["c1", "c4", "c10"]] = df[["c2", "c3", "c4"]] * 2
  
      result = df.execute().fetch()
      expected = data.copy()
      expected[["c1", "c4", "c10"]] = expected[["c2", "c3", "c4"]] * 2
      pd.testing.assert_frame_equal(result, expected)
  
      # test setitem into empty DataFrame
      df = md.DataFrame()
      df["a"] = md.Series(np.arange(1, 11), chunk_size=3)
      pd.testing.assert_index_equal(
          df.index_value.to_pandas(), pd.RangeIndex(10)
      )
  
      result = df.execute().fetch()
      expected = pd.DataFrame()
      expected["a"] = pd.Series(np.arange(1, 11))
      pd.testing.assert_frame_equal(result, expected)
  
      df["b"] = md.Series(
          np.arange(2, 12), index=pd.RangeIndex(1, 11), chunk_size=3
      )
      result = df.execute().fetch()
      expected["b"] = pd.Series(
          np.arange(2, 12), index=pd.RangeIndex(1, 11)
      )
      pd.testing.assert_frame_equal(result, expected)
  
      # test set multiple item order
      data = pd.DataFrame(
          [list(range(5))] * 10,
          columns=["cc" + str(i) for i in range(5)],
          index=["i" + str(i) for i in range(10)],
      )
      df = md.DataFrame(data, chunk_size=3)
      df2 = df.apply(
          lambda x: x * 2,
          axis=1,
          result_type="expand",
          dtypes=[np.int64, np.int64, np.int64, np.int64, np.int64],
          output_type="dataframe",
      )
      columns = ["dd" + str(i) for i in range(5)]
      columns[1] = "cc2"
      columns[3] = "cc1"
      columns[4] = "cc3"
      df2.columns = columns
      df[columns] = df2[columns]
      result = df.execute().fetch()
      df2 = data.apply(lambda x: x * 2)
      df2.columns = columns
      data[columns] = df2[columns]
      pd.testing.assert_frame_equal(result, data)
  
imports: import os
  import tempfile
  import mars
  import numpy
  import pandas
  import pytest
  from ....None import dataframe
  from ....None import tensor
  from ....utils import pd_release_version
  from ...datasource.read_csv import DataFrameReadCSV
  from ...datasource.read_sql import DataFrameReadSQL
  from ...datasource.read_parquet import DataFrameReadParquet
label_desc: Use image node_id 13 for calling a global function with example usage: test_setitem(setup) without return types