'taken originally from
http://stackoverflow.com/questions/2687173/django-how-can-i-get-a-block-from-a-template'

def _get_node(self, nodelist, name):

    for node in nodelist:
        if (isinstance(node, BlockNode) and (node.name == name)):
            return node
        elif hasattr(node, 'nodelist'):
            child = self._get_node(node.nodelist, name)
            if child:
                return child
    return None
