code: def rand_bool(p:float, size:Optional[List[int]]=None)->BoolOrTensor:
      "Draw 1 or shape=`size` random booleans (`True` occuring with probability `p`)."
      return uniform(0,1,size)<f rand_bool(p:float, size:Optional[List[int]]=None)->BoolOrTensor:
      "Draw 1 or shape=`size` random booleans (`True` occuring with probability `p`)."
      return uniform(0,1,size)<p
docs: Draw 1 or shape=`size` random booleans (`True` occuring with probability `p`).