python code to average over MI from each disorder