nce(mark_groups, (VertexClustering, VertexCover)):
            # Vertex clustering
            group_iter = ((group, color) for color, group in enumerate(mark_groups))
        elif hasattr(mark_groups, &#34;__iter__&#34;):
            # Lists, tuples, iterators etc
            group_iter = iter(mark_groups)
        else:
            # False
            group_iter = iter({}.items())

        if kwds.get(&#34;legend&#34;, False):
            legend_info = {
                &#34;handles&#34;: [],
             