def __remove(node, com, weight, status):
    """ Remove node from community com and modify status"""
    status.degrees[com] = status.degrees.get(com, 0.0) - status.gdegrees.get(
        node, 0.0)
    status.internals[com] = float(status.internals.get(com, 0.0) - weight -
        status.loops.get(node, 0.0))
    status.node2com[node] = -1
    if status.directed:
        status.inoutdegrees[com] = status.inoutdegrees.get(com, 0.0
            ) - status.gindegrees.get(node, 0.0) * status.goutdegrees.get(node,
            0.0)
