if isinstance(color, list):
assert all(len(g) == len(color) for g in data)
returns an error if the color list [len(color)] is larger then the label size [len(g)]. But this function should work is the length of the color list is greater than then labels (still have enough colors and the index will not be out of range).
That change make the test to be '<=' instead of '=='.
In the checks list:
returns an error if the color list [len(color)] is larger then the label size [len(g)]. But this function should work is the length of the color list is greater than then labels (still have enough colors and the index will not be out of range). That change make the test to be '<=' instead of '=='.