How to set optical sensor brightness

I looked at the pros documentation for setting brightness, but it doesnt work when I try it.