code: def ensure_private_dir_exists(app_name):
      
      path = private_dir_path(app_name)
      if not os.path.exists(path):
          os.makedirs(path)
      else:
          if not os.path.isdir(path):
              raise PrivateDirConflictError
docs: Ensures that the private directory exists and is a directory.
  
      :param str app_name: the name of the app