def _get_or_create_main_genre_node(main_genre_name, taxonomy_graph):
    """
    Return the node for the main genre if it exists, otherwise create a new node and
    make it a child of the root node.
    """
    if main_genre_name in taxonomy_graph:
        main_genre_node = taxonomy_graph.get_node(main_genre_name)
    else:
        main_genre_node = taxonomy_graph.add_genre_node(main_genre_name)
        taxonomy_graph.add_edge(taxonomy_graph.get_root_node(), main_genre_node)

    return main_genre_node