Check production mode programmatically

Hi.
I need to create a production pipeline for devices with ZIMKEY4 installed. After some installation steps, we need to check the integrity of our installation programmatically. One of the final device state properties is ZimKey in production mode. Could I check if ZimKey is in production mode programmatically?