generate role dict