def make_label(expr, node_type):
    """
    Make a graph label to replace named variable values and variable functions.
    If it is a variable function (node_type = 'internal'), the label is '<var_func>'.
    If it is a variable value (node_type = 'leaf'), the label is:
        <var_ev> if the variable name starts with 'e' (event).
        <var_en> otherwise (entity).
    """
    label = '<var_en>'
    if node_type == 'internal':
        label = '<var_func>'
    else:
        if expr.startswith('e'):
            label = '<var_ev>'
        if expr[0].isupper():
            label = '<var_func>'
    return label