def METHOD_NAME(name, parent, zipfile):
    with TemporaryDirectory() as tmp_dir:
        extract_zipfile_to_tmp_dir(zipfile, tmp_dir)
        validate_zipfile_contains_single_directory(tmp_dir)
        theme_dir = os.path.join(tmp_dir, os.listdir(tmp_dir)[0])
        cleaned_manifest = clean_theme_contents(theme_dir)
        theme = create_theme_from_manifest(name, parent, cleaned_manifest)
        try:
            create_css_from_manifest(theme_dir, theme, cleaned_manifest["css"])
            create_media_from_manifest(theme_dir, theme, cleaned_manifest["media"])
        except Exception:
            theme.delete()
            raise InvalidThemeManifest()
        else:
            for css in theme.css.filter(url__isnull=False):
                update_remote_css_size.delay(css.pk)
            build_theme_css.delay(theme.pk)
        return theme