code: def test_to_csv(cleared_fs, df1):
      df1.to_csv("memory://test/test.csv", index=True)
  
      df2 = read_csv(
          "memory://test/test.csv", parse_dates=["dt"], index_col=0
      )
  
      tm.assert_frame_equal(df1, df2)
  
imports: import io
  import numpy
  import pytest
  from pandas import DataFrame, date_range, read_csv, read_excel, read_feather, read_json, read_parquet, read_pickle, read_stata, read_table
  import pandas._testing
  from pandas.util import _test_decorators
label_desc: Use image node_id 6 for calling a global function with example usage: test_to_csv(cleared_fs, df1) without return types