Create StaticMeshComponent attached under a SceneComponent

I have an actor in the scene, with a sub actor, that has SceneComponents in the details tab
There are a lot of these scene components and I want to spawn meshes from the asset libray there,
I had no trouble creating the the mesh or the mesh component, but the attaching is not going as planned.
when I query, every thing seems okay, except the mesh is in Transient, and I can not see it in the viewport
I need help!! I know from some digging around that this might be because it is not attached to an actor,
I am not sure where to go from here, any help would be much appreciated.
I have not done any C++ in a decade so I would like to keep this in python.
It also does not need to be optimized as it will not done on runtime.
It does not need physics or collision or any thing else.

def load_static_mesh(path: str) → unreal.StaticMesh:
eal = unreal.EditorAssetLibrary
asset: object = eal.load_asset(path)
if not isinstance(asset, unreal.StaticMesh):
raise Exception(“Failed to load StaticMesh from {path}”)
return asset

def create_component_from_mesh_path(mesh_path: str) → unreal.StaticMeshComponent:
static_mesh = load_static_mesh(mesh_path)
static_mesh_component = unreal.StaticMeshComponent()
if not static_mesh_component.set_static_mesh(static_mesh):
raise Exception(“Failed to set static mesh”)
return static_mesh_component

def attach_mesh_to_ctrl(ctrl: unreal.SceneComponent, mesh: unreal.StaticMeshComponent):
static_mesh_component = create_component_from_mesh_path(mesh.package_name)
rel = unreal.AttachmentRule.KEEP_RELATIVE
static_mesh_component.attach_to_component(parent=ctrl, socket_name=unreal.Name(), location_rule=rel, rotation_rule=rel, scale_rule=rel)

Figured it out.
I had to take the Actor parent of the SceneComponents and use that to create the StaticMeshComponent using the get_component_by_class funtion and passing it unreal.StaticMeshComponent.static_class(), then I assigned the StaticMesh to that Component and after that I used the attach_to_component function of the StaticMeshComponent to attach it to the SceneComponent I wanted.