I'd recommend a helper method or lambda within this function for the 3 lines of code that are duplicated 4 times. Could even roll in the creation if you wish (having it return the created role).