With the `DEG()` macro in place, this may be as simple as modifying it to subtract the self-loop from the sum of out-degree and in-degree.