code: def test_changing_dtypes_with_duplicate_columns(self):
      # multiple assignments that change dtypes
      # the location indexer is a slice
      # GH 6120
      df = DataFrame(
          np.random.default_rng(2).standard_normal((5, 2)),
          columns=["that", "that"],
      )
      expected = DataFrame(
          1.0, index=range(5), columns=["that", "that"]
      )
  
      df["that"] = 1.0
      tm.assert_frame_equal(df, expected)
  
      df = DataFrame(
          np.random.default_rng(2).random((5, 2)),
          columns=["that", "that"],
      )
      expected = DataFrame(1, index=range(5), columns=["that", "that"])
  
      df["that"] = 1
      tm.assert_frame_equal(df, expected)
  
imports: import numpy
  import pytest
  import pandas
  from pandas import DataFrame, Series, date_range
  import pandas._testing
label_desc: Use image node_id 6 for calling the TestDataFrameNonuniqueIndexes obj's underlying member method code with example usage: obj.test_changing_dtypes_with_duplicate_columns() without return types