code: def test_asfreq_keep_index_name(self, frame_or_series):
      # GH#9854
      index_name = "bar"
      index = date_range("20130101", periods=20, name=index_name)
      obj = DataFrame(list(range(20)), columns=["foo"], index=index)
      obj = tm.get_obj(obj, frame_or_series)
  
      assert index_name == obj.index.name
      assert index_name == obj.asfreq("10D").index.name
  
imports: from datetime import datetime
  import numpy
  import pytest
  from pandas._libs.tslibs.offsets import MonthEnd
  from pandas import DataFrame, DatetimeIndex, Series, date_range, period_range, to_datetime
  import pandas._testing
  from pandas.tseries import offsets
label_desc: Use image node_id 5 for calling the TestAsFreq obj's underlying member method code with example usage: obj.test_asfreq_keep_index_name(frame_or_series) without return types