code: private IRingSet removeExtraRings(IAtomContainer m) throws Exception {
  
          IRingSet rs = Cycles.sssr(m).toRingSet();
  
          //remove rings which dont have all aromatic atoms (according to hybridization set by lower case symbols in smiles):
          Iterator<IAtomContainer> i = rs.atomContainers().iterator();
          while (i.hasNext()) {
              IRing r = (IRing) i.next();
              if (r.getAtomCount() > 8) {
                  i.remove();
              } else {
                  for (IAtom a : r.atoms()) {
                      Hybridization h = a.getHybridization();
                      if (h == CDKConstants.UNSET || !(h == Hybridization.SP2 || h == Hybridization.PLANAR3)) {
                          i.remove();
                          break;
                      }
                  }
              }
          }
          return rs;
      }
docs: Removes rings which do not have all sp2/planar3 aromatic atoms.
  and also gets rid of rings that have more than 8 atoms in them.
  
  @param m The {@link IAtomContainer} from which we want to remove rings
  @return The set of reduced rings