code: def test_file_binary_mode(c_parser_only):
      # see gh-23779
      parser = c_parser_only
      expected = DataFrame([[1, 2, 3], [4, 5, 6]])
  
      with tm.ensure_clean() as path:
          with open(path, "w", encoding="utf-8") as f:
              f.write("1,2,3\n4,5,6")
  
          with open(path, "rb") as f:
              result = parser.read_csv(f, header=None)
              tm.assert_frame_equal(result, expected)
  
imports: from decimal import Decimal
  from io import BytesIO, StringIO, TextIOWrapper
  import mmap
  import os
  import tarfile
  import numpy
  import pytest
  from pandas.compat.numpy import np_version_gte1p24
  from pandas.errors import ParserError, ParserWarning
  import pandas.util._test_decorators
  from pandas import DataFrame, concat
  import pandas._testing
label_desc: Use image node_id 24 for calling a global function with example usage: test_file_binary_mode(c_parser_only) without return types