code: def test_parquet_file_pass_directory_instead_of_file(tempdir):
      # ARROW-7208
      path = tempdir / "directory"
      os.mkdir(str(path))
  
      msg = (
          f"Cannot open for reading: path '{str(path)}' is a directory"
      )
      with pytest.raises(IOError) as exc:
          pq.ParquetFile(path)
      if exc.errisinstance(PermissionError) and sys.platform == "win32":
          return  # Windows CI can get a PermissionError here.
      exc.match(msg)
  
file_path: arrow/python/pyarrow/tests/parquet/test_parquet_file.py
imports: import io
  import os
  import sys
  import pytest
  import pyarrow
label_desc: Use image node_id 7 for calling a global function with example usage: test_parquet_file_pass_directory_instead_of_file(tempdir) without return types