def _generate_collection(group, ax, ctype, colors):
color = TREE_COLOR[ctype]<EOL>collection = PolyCollection(group, closed=False, antialiaseds=True,<EOL>edgecolors='<STR_LIT>', facecolors=color)<EOL>ax.add_collection(collection)<EOL>if color not in colors:<EOL><INDENT>label = str(ctype).replace('<STR_LIT>', '<STR_LIT>').replace('<STR_LIT:_>', '<STR_LIT:U+0020>').capitalize()<EOL>ax.plot((<NUM_LIT:0.>, <NUM_LIT:0.>), (<NUM_LIT:0.>, <NUM_LIT:0.>), c=color, label=label)<EOL>colors.add(color)<EOL><DEDENT>
Render rectangle collection