code: def test_merge_on_duplicate_columns(setup, auto_merge):
      raw1 = pd.DataFrame(
          [["foo", 1, "bar"], ["bar", 2, "foo"], ["baz", 3, "foo"]],
          columns=["lkey", "value", "value"],
          index=["a1", "a2", "a3"],
      )
      raw2 = pd.DataFrame(
          {"rkey": ["foo", "bar", "baz", "foo"], "value": [5, 6, 7, 8]},
          index=["a1", "a2", "a3", "a4"],
      )
  
      df1 = from_pandas(raw1, chunk_size=2)
      df2 = from_pandas(raw2, chunk_size=3)
  
      r = df1.merge(
          df2,
          left_on="lkey",
          right_on="rkey",
          auto_merge=auto_merge,
          auto_merge_threshold=0,
      )
      result = r.execute().fetch()
      expected = raw1.merge(raw2, left_on="lkey", right_on="rkey")
      pd.testing.assert_frame_equal(expected, result)
  
file_path: mars/mars/dataframe/merge/tests/test_merge_execution.py
imports: import numpy
  import pandas
  import pytest
  from ....core.graph.builder.utils import build_graph
  from ...datasource.dataframe import from_pandas
  from ...datasource.series import from_pandas
  from ...utils import sort_dataframe_inplace
  from ..None import concat, DataFrameConcat, DataFrameMergeAlign
label_desc: Use image node_id 8 for calling a global function with example usage: test_merge_on_duplicate_columns(setup, auto_merge) without return types