Choosing which component of a SMIRKS to remove decorators from is weighted by their current complexity. First, a ChemicalEnvironment is created from the chosen SMIRKS pattern which allows us to loop over all of its atoms and bonds. For each component (atom or bond), we store the number of decorators in that component. Finally, a component to change is chosen at random weighted by the number of decorators it contains. This means that an "empty" atom or bond, one with no decorators, will never be chosen, if all of the atoms and bonds are already empty then this iteration is rejected with no changes made.