'Recursively look through objects in legend children'

def crawl_legend(self, ax, legend):

    legendElements = list(utils.iter_all_children(legend._legend_box, skipContainers=True))
    legendElements.append(legend.legendPatch)
    for child in legendElements:
        child.set_zorder((1000000.0 + child.get_zorder()))
        try:
            if isinstance(child, matplotlib.patches.Patch):
                self.draw_patch(ax, child, force_trans=ax.transAxes)
            elif isinstance(child, matplotlib.text.Text):
                if (not ((child is legend.get_children()[(-1)]) and (child.get_text() == 'None'))):
                    self.draw_text(ax, child, force_trans=ax.transAxes)
            elif isinstance(child, matplotlib.lines.Line2D):
                warnings.warn(('Legend    element    %s    not    implemented' % child))
            elif isinstance(child, matplotlib.collections.Collection):
                self.draw_collection(ax, child, force_pathtrans=ax.transAxes)
            else:
                warnings.warn(('Legend    element    %s    not    implemented' % child))
        except NotImplementedError:
            warnings.warn(('Legend    element    %s    not    implemented' % child))
