code: def test_directory(tmpdir):
      # Proper directories pass validation.
      assert us.Directory.validate(tmpdir) == tmpdir
  
      # random dirs that I made up dont!
      with pytest.raises(s.SchemaError):
          assert us.Directory.validate("random")
  
imports: import tempfile
  import schema
  import caliban.util.schema
  import pytest
label_desc: Use image node_id 1 for calling a global function with example usage: test_directory(tmpdir) without return types