def METHOD_NAME(theme_dir, manifest):
    if not isinstance(manifest, list):
        raise InvalidThemeManifest()
    theme_media_dir = os.path.join(theme_dir, "media")
    if not os.path.isdir(theme_media_dir):
        raise InvalidThemeManifest()
    cleaned_data = []
    for item in manifest:
        cleaned_data.append(clean_media_list_item(theme_media_dir, item))
    return cleaned_data