code: def test_default_for_key_class(self):
      metric = metrics.Loss
      metric = default_for_key("test")(metric)
      self.assertTrue(metrics.get_default("test").name == "loss")
      self.assertTrue(metric == metrics.Loss)
  
imports: import unittest
  from mock import Mock
  import torchbearer.metrics
  from torchbearer.metrics import default_for_key, lambda_metric, EpochLambda, BatchLambda
label_desc: Use image node_id 1 for calling the TestDecorators obj's underlying member method code with example usage: obj.test_default_for_key_class() without return types