### 🐛 Describe the bug With `p=1`, setting a list of no transforms to `transforms` argument of [RandomApply()](https://pytorch.org/vision/main/generated/torchvision.transforms.v2.RandomApply.html) gets the error as shown below. *You can see [this issue](https://github.com/pytorch/vision/issues/9022) as well: ```python from torchvision.datasets import OxfordIIITPet from torchvision.transforms.v2 import RandomApply my_data = OxfordIIITPet( root="data", # ↓↓↓↓↓↓↓ transform=RandomApply(transforms=[], p=1) ) my_data[0][0] # Error ``` > UnboundLocalError: cannot access local variable 'outputs' where it is not associated with a value But with `p=0`, setting a list of no transforms to `transforms` argument doesn't get error as shown below: ```python from torchvision.datasets import OxfordIIITPet from torchvision.transforms.v2 import RandomApply my_data = OxfordIIITPet( root="data", # ↓↓↓↓↓↓↓ transform=RandomApply(transforms=[], p=0) ) my_data[0][0] # No error ```  ### Versions ```python import torchvision torchvision.__version__ # '0.20.1' ```