code: def test_to_frame(self, datetime_series):
      datetime_series.name = None
      rs = datetime_series.to_frame()
      xp = DataFrame(
          datetime_series.values, index=datetime_series.index
      )
      tm.assert_frame_equal(rs, xp)
  
      datetime_series.name = "testname"
      rs = datetime_series.to_frame()
      xp = DataFrame(
          {"testname": datetime_series.values},
          index=datetime_series.index,
      )
      tm.assert_frame_equal(rs, xp)
  
      rs = datetime_series.to_frame(name="testdifferent")
      xp = DataFrame(
          {"testdifferent": datetime_series.values},
          index=datetime_series.index,
      )
      tm.assert_frame_equal(rs, xp)
  
imports: import pytest
  from pandas import DataFrame, Index, Series
  import pandas._testing
label_desc: Use image node_id 2 for calling the TestToFrame obj's underlying member method code with example usage: obj.test_to_frame(datetime_series) without return types