Rotation to assembly

While reading a STEP file, I’ve created a tree data structure representing assemblies and parts.
An assembly can contain sub-assemblies and parts.
A part is always the last node in the hierarchy.

For assemblies, I save the label using:
auto shape = XCAFDoc_ShapeTool::GetShape(assmLabel).Located(loc, Standard_False);
assm->m_shape = new AIS_AnnotableColoredShape(shape);
(where AIS_AnnotableColoredShape is derived from AIS_ColoredShape).

For parts, I can select the AIS_Shape from the viewer and apply transformations like this:

gp_Trsf rot;
rot.SetRotation(ax, M_PI / 2.0); // 90 degrees
gp_Trsf newLoc = rot * aAIS->LocalTransformation();
aAIS->SetLocalTransformation(newLoc);

Problem: For assemblies, I cannot select the AIS_Shape in the same way.
I want to apply a transformation to the assembly as a whole—specifically, rotate it around the Y-axis at its origin.