def cal_nodes(cut_off_value, labels):
    """Creates nodes for the hierarchical value map (vis.js network) based on Args

    Args:
        cut_off_value ([int]): [cutoff-value]
        labels ([dict]): [labels]

    Returns:
        [Array]: [nodes]
    """
    nodes = []
    for l in labels:
        if (l.get('acv')=='A'):
            nodes.append({'id':l.get('labelcode'), 'label':l.get('name'), 'group':'attributes', 'level':'3'})
        elif (l.get('acv')=='C'):
            nodes.append({'id':l.get('labelcode'), 'label':l.get('name'), 'group':'consequences', 'level':'2'})
        elif (l.get('acv')=='V'):
            nodes.append({'id':l.get('labelcode'), 'label':l.get('name'), 'group':'values', 'level':'1'})
        else:
            pass

    return nodes