code: def _create_package_hierarchy(prefix=settings.TEMP_DIR, book_id=None):
      
      root_dir = _get_package_name(book_id=book_id, prefix=prefix)
  
      if os.path.exists(root_dir):
          shutil.rmtree(root_dir)
  
      os.mkdir(root_dir)
  
      original_dir = os.path.join(root_dir, "original")
      metadata_dir = os.path.join(root_dir, "metadata")
  
      os.mkdir(original_dir)
      os.mkdir(metadata_dir)
  
      return root_dir, original_dir, metadata_dir
docs: Create hierarchy of directories, at it is required in specification.
  
      `root_dir` is root of the package generated using :attr:`settings.TEMP_DIR`
      and :func:`_get_package_name`.
  
      `orig_dir` is path to the directory, where the data files are stored.
  
      `metadata_dir` is path to the directory with MODS metadata.
  
      Args:
          book_id (str, default None): UUID of the book.
          prefix (str, default settings.TEMP_DIR): Where the package will be
                 stored. Default :attr:`settings.TEMP_DIR`.
  
      Warning:
          If the `root_dir` exists, it is REMOVED!
  
      Returns:
          list of str: root_dir, orig_dir, metadata_dir