code: def test_other_headers():
      buf = StringIO()
      df = pd.DataFrame([1, 2, 3])
      df.to_markdown(buf=buf, headers=["foo", "bar"])
      result = buf.getvalue()
      assert result == (
          "|   foo |   bar |\n|------:|------:|\n|     0 "
          "|     1 |\n|     1 |     2 |\n|     2 |     3 |"
      )
  
file_path: pandas/pandas/tests/io/formats/test_to_markdown.py
imports: from io import BytesIO, StringIO
  import pytest
  import pandas
  import pandas._testing
label_desc: Use image node_id 4 for calling a global function with example usage: test_other_headers() without return types