Looking for the SugarLogic visibility code

I am looking for the code that controls if a field is visible or not based on the Visibility SugarLogic entered in Studio.  I have a group of fields that I have to show/hide based on a complex formula that I cant make work in Dependencies.  I have the fields hiding and showing just fine but I am looking for the code used to collapse a row if both fields in that row are hidden.  I found a way to do it (hardcoded) but I'd like something a little more automatic and less hardcoded.