code: def test_register_decorator(self):
      ayy_lmao_set = set()
  
      @self.register("ayy-lmao")
      def ayy_lmao():
          return ayy_lmao_set
  
      expected_metrics_sets = mappingproxy({"ayy-lmao": ayy_lmao})
      assert_equal(self.metrics_sets, expected_metrics_sets)
      assert_is(self.load("ayy-lmao"), ayy_lmao_set)
  
      msg = "metrics set 'ayy-lmao' is already registered"
      with assert_raises_str(ValueError, msg):
  
          @self.register("ayy-lmao")
          def other():  # pragma: no cover
              raise AssertionError("dead")
  
      # ensure that the failed registration didn't break the previously
      # registered set
      assert_equal(self.metrics_sets, expected_metrics_sets)
      assert_is(self.load("ayy-lmao"), ayy_lmao_set)
  
      self.unregister("ayy-lmao")
      assert_equal(self.metrics_sets, mappingproxy({}))
  
      msg = "no metrics set registered as 'ayy-lmao', options are: []"
      with assert_raises_str(ValueError, msg):
          self.load("ayy-lmao")
  
      msg = "metrics set 'ayy-lmao' was not already registered"
      with assert_raises_str(ValueError, msg):
          self.unregister("ayy-lmao")
  
file_path: zipline/tests/metrics/test_core.py
imports: from zipline.finance.metrics.core import _make_metrics_set_core
  from zipline.testing.fixtures import ZiplineTestCase
  from zipline.testing.predicates import assert_equal, assert_is, assert_raises_str
  from zipline.utils.compat import mappingproxy
label_desc: Use image node_id 3 for calling the MetricsSetCoreTestCase obj's underlying member method code with example usage: obj.test_register_decorator() and returns: ayy_lmao_set