getBlocks function

Get Blocks of a Graph