'Get figure type of nodes.'

def get_figtype(self, node):

    def has_child(node, cls):
        return any((isinstance(child, cls) for child in node))
    if isinstance(node, nodes.section):
        return 'section'
    elif isinstance(node, nodes.container):
        if (node.get('literal_block') and has_child(node, nodes.literal_block)):
            return 'code-block'
        else:
            return None
    else:
        (figtype, _) = self.enumerable_nodes.get(node.__class__, (None, None))
        return figtype
