Rough implementation of graph computation