It seems like this would be a lot of work to write. I think you would need to do something like:
(Talking GSD only)
-collect all geosets in part
-collect all hybridshapes in all geosets
-get the first hybridshapes' inputs ***
-get the first hybridshapes' typename
-loop through the rest of the hybrid shapes in the part
-if the typename of subsequent hybridshapes matches the first, check to see if the inputs are the same
-repeat for all hybridshapes in part
But as Ferdo mentions, this may not be enough. You would need a way to detect geometric differences like what if one join removes sub elements and another join of the same inputs does not? Or if surfaces are split to save one side then the same surfaces are split to save the other side? You would also need to compare each features parameters, like if propagation was turned on or off.
***you would need to interrogate inputs for each feature, but each features inputs are exposed with different functions. I.e. For a join (hybridshapeassemble) you can get the number of elements joined by using the GetElementsSise function, then loop through the inputs using the GetElements function. An extracts inputs could be exposed using element or support.