Creating blueprint assets/hierarchies with Python

My solution for BP for each mesh asset, withou static mesh component:

import unreal

package_path = '/Game/PLATFORMER_StylizedCubeWorld_Vol1/Models/Background'

# Get all assets in the folder
all_assets = unreal.EditorAssetLibrary.list_assets(package_path)

# Extract and print the names of the assets
for asset_data in all_assets:
    asset_name = asset_data.rsplit(".", 1)[-1]
    
    factory = unreal.BlueprintFactory()
    factory.set_editor_property("ParentClass", unreal.Actor)

    asset_tools = unreal.AssetToolsHelpers.get_asset_tools()
    my_new_asset = asset_tools.create_asset(asset_name + "_BP", package_path, None, factory)

    unreal.EditorAssetLibrary.save_loaded_asset(my_new_asset)