code: def test_to_csv_single_level_multi_index(
      self, ind, expected, frame_or_series
  ):
      # see gh-19589
      obj = frame_or_series(pd.Series([1], ind, name="data"))
  
      result = obj.to_csv(lineterminator="\n", header=True)
      assert result == expected
  
imports: import io
  import os
  import sys
  from zipfile import ZipFile
  from _csv import Error
  import numpy
  import pytest
  import pandas
  from pandas import DataFrame, Index, compat
  import pandas._testing
label_desc: Use image node_id 17 for calling the TestToCSV obj's underlying member method code with example usage: obj.test_to_csv_single_level_multi_index(ind, expected, frame_or_series) without return types