Generic code to calculate an integer invariant for graphs in multicode format
Example of usage of code for calculating the invariant value of graphs