Read telemetry status

Hello i am trying to read telemetry status from a script, i know how to do bindings so do you know in which library i have to search?
I try “read_receiver_link_quality” from AP_Rssi but it is not working.
I just want to know in the script if i have communication with autopilot or not.
Thank’s!