'Determines if a node can be modified using a data-if/data-else.
Nodes that already have a data-if or data-else should not be modified
and we end up wrapping the inner contents of the node instead.
Additionally certain blacklisted nodes should not be modified, such as
\'question\' or \'problem\' nodes, of which there should only be one.
Returns True if the node can be modified, False if not.'

def can_have_if(self, node):

    className = node.get('class')
    if className:
        for banned_class in self._blacklist_classes:
            if (banned_class in className):
                return False
    return ((node.get('data-if') is None) and (node.get('data-else') is None))
