code: def test_spark_flavor_preserves_pandas_metadata():
      df = _test_dataframe(size=100)
      df.index = np.arange(0, 10 * len(df), 10)
      df.index.name = "foo"
  
      result = _roundtrip_pandas_dataframe(
          df, {"version": "2.0", "flavor": "spark"}
      )
      tm.assert_frame_equal(result, df)
  
imports: import io
  import json
  import numpy
  import pytest
  import pyarrow
  from pyarrow.fs import LocalFileSystem, SubTreeFileSystem
  from pyarrow.util import guid
  from pyarrow.vendored.version import Version
label_desc: Use image node_id 11 for calling a global function with example usage: test_spark_flavor_preserves_pandas_metadata() without return types