code: def test_frame_init_df_duplicated(self):
      # initialization by dataframe and duplicated target
      df = pd.DataFrame(
          {"A": [1, 2, 3], "B": [4, 5, 6], "C": [7, 8, 9]},
          columns=["A", "B", "C"],
      )
      s = pd.Series([10, 11, 12], name="A")
  
      msg = "data and target must have unique names"
      with pytest.raises(ValueError, match=msg):
          pdml.ModelFrame(df, target=s)
  
      df = pdml.ModelFrame(
          {"A": [1, 2, 3], "B": [4, 5, 6], "C": [7, 8, 9]},
          columns=["A", "B", "C"],
      )
      df.target = pd.Series([10, 11, 12], name="A")
      expected = pdml.ModelFrame(
          {"A": [10, 11, 12], "B": [4, 5, 6], "C": [7, 8, 9]},
          columns=["A", "B", "C"],
      )
      tm.assert_frame_equal(df, expected)
  
imports: import pytest
  import datetime
  import warnings
  import numpy
  import pandas
  import sklearn.datasets
  import sklearn.svm
  import pandas_ml
  import pandas_ml.util.testing
label_desc: Use image node_id 9 for calling the TestModelFrame obj's underlying member method code with example usage: obj.test_frame_init_df_duplicated() without return types