How to change prim visibility use usdrt

import omni.usd
from usdrt import Usd, Sdf, UsdGeom, Rt, Gf, Vt

stage_id = omni.usd.get_context().get_stage_id()

stage = Usd.Stage.Attach(stage_id)

prim=stage.GetPrimAtPath(‘/World/Cube’)
attrib=prim.GetAttribute(‘visibility’)
print(attrib.Get())
attrib.Set(‘invisible’)

above code is not effect

I am assuming you are trying to set the Cube to invisible?

yes,but use usdrt ,it is not effect,still can visible