Edit randomGraph function to allow for degree definition