Moduli spaces of colored graphs