I'm looking for a way to programmatically remove empty symbol classes from the Contents pane. Although it's easy to remove empty symbol classes by going to the Symbology pane and removing classes with a count of 0, I need to automate this with ArcPy. Maybe using the CIM is necessary? I'm trying to do this on a View Service with symbol classes based on domains.