def _extract_dialog_node_name(dialog_nodes):
    """
    For each dialog_node (node_id) of type *standard*, check if *title exists*.
    If exists, use the title for the node_name. otherwise, use the dialog_node
    For all other cases, use the dialog_node

    dialog_node: (dialog_node_title, dialog_node_type)

    In the case of Login Issues,
    "title": "Login Issue",
    "dialog_node": "Login Issues",

    the record will be created as:
    "Login Issues": ("Login Issue", "standard")
    """
    nodes_dict = {}
    nodes_type = {}
    for obj in dialog_nodes:
        if (obj['type']=='standard') and ('title' in obj):
            if (obj['title'] is not None):
                nodes_dict[obj['dialog_node']] = (obj['title'],obj['type'])
            else:
                nodes_dict[obj['dialog_node']] = (obj['dialog_node'],obj['type'])
        else:
            nodes_dict[obj['dialog_node']] = (obj['dialog_node'],obj['type'])
    return nodes_dict