def METHOD_NAME(self):
    """
    test metric validator
    """
    t = TrainingArgs()
    # test_metric key
    t ^= {"test_metric": None}
    self.assertEqual(t['test_metric'], None)
    t ^= {"test_metric": "ACCURACY"}
    self.assertEqual(t['test_metric'], "ACCURACY")
    t ^= {"test_metric": MetricTypes.ACCURACY}
    self.assertEqual(t['test_metric'], MetricTypes.ACCURACY)
    dico = t.dict()
    self.assertEqual(dico['test_metric'], "ACCURACY")
    with self.assertRaises(FedbiomedUserInputError):
        t ^= {"test_metric": "RULE_OF_THUMB"}
    # t was not changed by previous line
    self.assertEqual(t['test_metric'], MetricTypes.ACCURACY)
    # test_metric_args key
    t ^= {"test_metric_args": {"must_be_a_dict": True}}
    with self.assertRaises(FedbiomedUserInputError):
        t ^= {"test_metric_args": "not a dict"}