Random Graph with 1 node makes no sense - I add require to the method suggested by you