def generate_color_map(graph_object, individual_df):
    """ Generates a color map corresponding with whether a node represents an individual or membership
    :param graph_object: NetworkX graph object
    :param individual_df: DataFrame of the individual table query
    :return colors: A list of colors to be passed to the networkx.draw() function
    """
    individual_nodes = list(individual_df['INDIVIDUAL_ID'])

    for n in graph_object.nodes:
        graph_object.nodes[n]['color'] = 'c' if n in individual_nodes else 'm'

    colors = [node[1]['color'] for node in graph_object.nodes(data=True)]
    return colors