Detect Current Device for a Traffic Group

Our System runs in an active-active configuration.

Now I would like to detect if a Traffic Group is active on the BigIP. I look for something like get_current_device or so.

Thanks