Unable to get top-level xform without also selecting inside hierarchy

Hi,

I wanted to select and randomly rotate an xform with other xforms within it. I am trying

    item_1= rep.get.prims(
        path_pattern="/Replicator/Ref_Xform/Ref/asset_1/item_1",
        path_pattern_exclusion=[
            "/Replicator/Ref_Xform/Ref/asset_1/item_1/subitem_1",
            "/Replicator/Ref_Xform/Ref/asset_1/item_1/subitem_2",
        ]
    )
    with item_1:
        rep.modify.semantics(semantics=[("class", "item_1")])
        rep.modify.pose(rotation=rep.distribution.uniform((0, 0, 0), (45, 45, 45)))

I am trying to select at item_1 level and rotate randomly all subitems together. Can you please point me in the right direction?