def get_glom_nodes(G, target_glom):
    """Retrieve nodes for a glomerulus.
    
    # Arguments
    G: NetworkX graph to retrieve nodes from.
    target_glom: Name of the fruit fly olfactory system glomerulus to retrieve the nodes of.
    
    # Returns
    list: List of nodes to use.
    """
    subnodes = []
    for i in G.nodes():
        if (('PNs' in i) or ('ORNs' in i)) and target_glom+' ' not in i:
            pass
        else:
            subnodes.append(i)
    return subnodes