def potential_reciprocity(s, G):
    """For authors, check whether an acknowledged commenter is author and
    has coauthors; for commenters, check whether she is author and has papers
    without authors of the paper she is acknowledged on.
    """
    if isinstance(s, list):
        return any(c in G.nodes() and len(list(G.neighbors(c))) > 0 for c in s)
    else:
        authors = set(s['auth'])
        return any(c in G.nodes() and
                   len(set(G.neighbors(c)) - authors) > 0 for c in s['coms'])