How to get backface state for faces in view?

Tried with Python, but it gives inaccurate selection

p.s. sorry if in wrong category. Delete topic if needed.