move empty function calculation to a function replace conditionals with dictionary set calculations
move empty function calculation to a function
replace conditionals with dictionary set calculations

mitar/pychecker,mitar/pychecker