def update_dict(self, label: Dict, pred: Dict):
        """
        If label is missing the right name, copy it from the prediction.
        """
        if not set(self.label_names).issubset(set(label.keys())):
            label.update({name:pred[name] for name in self.label_names})
        super().update_dict(label, pred)
def update_dict ( self , label : Dict , pred : Dict ) : if not set ( self . label_names ) . issubset ( set ( label . keys ( ) ) ) : label . update ( { name : pred [ name ] for name in self . label_names } ) super ( ) . update_dict ( label , pred )
If label is missing the right name, copy it from the prediction.