add funcs.py to generate graphs and compute modularity features