code: def _usable_dir(path):
      """
      Returns True iff the desired path can be used as database path because
      either the directory exists and can be used, or its root directory can
      be used and we can make the directory as needed.
      """
      while not os.path.exists(path):
          # Loop terminates because the root dir ('/' on unix) always exists.
          path = os.path.dirname(path)
      return os.path.isdir(path) and os.access(
          path, os.R_OK | os.W_OK | os.X_OK
      )
  
imports: from __future__ import absolute_import, division, print_function
  import binascii
  import os
  import warnings
  from hashlib import sha384
  from hypothesis.configuration import mkdir_p, storage_directory
  from hypothesis.errors import HypothesisException, HypothesisWarning
  from hypothesis.internal.compat import hbytes
  from hypothesis.utils.conventions import not_set
label_desc: Use image node_id 1 for calling a global function with example usage: _usable_dir(path) and returns: unknown