def METHOD_NAME(tmp_dir):
    dir_contents = os.listdir(tmp_dir)
    if not dir_contents:
        raise ThemeImportError(
            pgettext("admin theme import", "Uploaded ZIP file is empty.")
        )
    if len(dir_contents) > 1:
        raise ThemeImportError(
            pgettext(
                "admin theme import",
                "Uploaded ZIP file should contain single directory.",
            )
        )
    if not os.path.isdir(os.path.join(tmp_dir, dir_contents[0])):
        raise ThemeImportError(
            pgettext(
                "admin theme import", "Uploaded ZIP file didn't contain a directory."
            )
        )