code: def test_subdirs(tmpdir: str):
      dir = f"{tmpdir}foo/"
      subdir1 = f"{dir}foo/"
      subdir1subdir1 = f"{subdir1}foo/"
      subdir1subdir2 = f"{subdir1}bar/"
      subdir1subdir3 = f"{subdir1}baz/"
      subdir1subdir4_empty = f"{subdir1}qux/"
      subdir2 = f"{dir}bar/"
      subdir3 = f"{dir}baz/"
      subdir4_empty = f"{dir}qux/"
  
      fs.mkdir(dir)
      touch(fs, f"{dir}a")
      touch(fs, f"{dir}b")
  
      fs.mkdir(subdir1)
      fs.mkdir(subdir1subdir1)
      fs.mkdir(subdir1subdir2)
      fs.mkdir(subdir1subdir3)
      fs.mkdir(subdir1subdir4_empty)
      fs.mkdir(subdir2)
      fs.mkdir(subdir3)
      fs.mkdir(subdir4_empty)
  
      for subdir in [
          dir,
          subdir1,
          subdir2,
          subdir3,
          subdir1subdir1,
          subdir1subdir2,
          subdir1subdir3,
      ]:
          for i in range(30):
              touch(fs, f"{subdir}a{i:02}")
  
      assert fs.is_dir(dir)
      assert fs.is_dir(subdir1)
      assert fs.is_dir(subdir1subdir1)
      assert fs.is_dir(subdir1subdir2)
      assert fs.is_dir(subdir1subdir3)
      # subdir1subdir4_empty: in cloud fses, empty dirs do not exist and thus are not dirs
      assert fs.is_dir(subdir2)
      assert fs.is_dir(subdir3)
      # subdir4_empty: in cloud fses, empty dirs do not exist and thus are not dirs
  
      fs.rmtree(subdir1subdir2)
  
      assert fs.is_dir(dir)
      assert fs.is_file(f"{dir}a")
      assert fs.is_file(f"{dir}b")
  
      assert fs.is_dir(subdir1)
      assert fs.is_file(f"{subdir1}a00")
  
      assert fs.is_dir(subdir1subdir1)
      assert fs.is_file(f"{subdir1subdir1}a00")
  
      assert not fs.is_dir(subdir1subdir2)
      assert not fs.is_file(f"{subdir1subdir2}a00")
  
      assert fs.is_dir(subdir1subdir3)
      assert fs.is_file(f"{subdir1subdir3}a00")
  
      assert fs.is_dir(subdir2)
      assert fs.is_file(f"{subdir2}a00")
      assert fs.is_dir(subdir3)
      assert fs.is_file(f"{subdir3}a00")
  
      fs.rmtree(dir)
  
      assert not fs.is_dir(dir)
  
imports: from typing import Generator
  import pytest
  import secrets
  import os
  import hail
  import hailtop.fs
  from hail.context import _get_local_tmpdir
  from hail.utils import hadoop_open, hadoop_copy, hadoop_ls
  from hailtop.utils import secret_alnum_string
  from hail.utils.java import FatalError
  from ..helpers import qobtest
label_desc: Use image node_id 10 for calling a global function with example usage: test_subdirs(tmpdir) without return types