Graph api examples - Simple graph metrics

A simple example that uses the graph api to compute some metrics.