code: def is_path_creatable(pathname: str) -> bool:
      
      # Parent directory of the passed path. If empty, we substitute the current
      # working directory (CWD) instead.
      dirname = os.path.dirname(pathname) or os.getcwd()
      return os.access(dirname, os.W_OK)
docs: Checks whether the given path is creatable.
  
      Returns
      -------
      `True` if the current user has sufficient permissions to create the passed
      pathname; `False` otherwise.