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


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

    item_1= rep.get.prims(
    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?