How to detect interpenetration between two objects - Isaac Sim Python

Hi,

I am working on an object manipulation project. In my case, I have a deep learning model that outputs the transformations for both objects, and I am using Isaac Sim to check if their final configuration is stable (with physics). Since there are likely some errors in the output transformations, interpenetration occurs, with one object getting stuck inside the other. My question is, how can I properly detect this interpenetration? Is it possible to calculate a separation/penetration distance? Thank you!