code: def test_write_json_invalid_directory(tmpdir):
      """Attempt to create a file in a directory that doesn't exist"""
      path = str(tmpdir.join("does-not-exist", "foo.json"))
      schema = {"geometry": "Unknown", "properties": [("title", "str")]}
      with pytest.raises(DriverError):
          fiona.open(path, "w", driver="GeoJSON", schema=schema)
  
file_path: Fiona/tests/test_geojson.py
imports: import json
  import pytest
  import fiona
  from fiona.collection import supported_drivers
  from fiona.errors import FionaValueError, DriverError, SchemaError, CRSError
  from fiona.model import Feature
label_desc: Use image node_id 5 for calling a global function with example usage: test_write_json_invalid_directory(tmpdir) without return types