The chunk of code that determines the overall status from the dictionary here seems like a good candidate for extracting into a helper method.