Add schemas code

`hist.counts.keySet.flatMap(squasSetOfParent(hist, _)`