code: def test_empty_frame_setitem_index_name_retained(self):
      # GH#31368 empty frame has non-None index.name -> retained
      df = DataFrame({}, index=pd.RangeIndex(0, name="df_index"))
      series = Series(1.23, index=pd.RangeIndex(4, name="series_index"))
  
      df["series"] = series
      expected = DataFrame(
          {"series": [1.23] * 4},
          index=pd.RangeIndex(4, name="df_index"),
          columns=Index(["series"], dtype=object),
      )
  
      tm.assert_frame_equal(df, expected)
  
imports: import numpy
  import pytest
  import pandas
  from pandas import DataFrame, Index, Period, Series, Timestamp, date_range, period_range
  import pandas._testing
label_desc: Use image node_id 1 for calling the TestEmptyFrameSetitemExpansion obj's underlying member method code with example usage: obj.test_empty_frame_setitem_index_name_retained() without return types