code: def test_should_raise_when_already_registered(self):
      # Given
      class MyBaseClass(Registrable):
          pass
  
      # pylint:disable=unused-variable
      @MyBaseClass.register("my_duplicated_subclass")
      class MySubclass(MyBaseClass):
          pass
  
      # When / Then
      with self.assertRaises(AlreadyRegisteredError):
  
          @MyBaseClass.register("my_duplicated_subclass")
          class MySecondSubclass(MyBaseClass):
              pass
  
file_path: snips-nlu/snips_nlu/tests/test_registrable.py
imports: from unittest import TestCase
  from snips_nlu.common.registrable import Registrable
  from snips_nlu.exceptions import NotRegisteredError, AlreadyRegisteredError
label_desc: Use image node_id 3 for calling the TestRegistrable obj's underlying member method code with example usage: obj.test_should_raise_when_already_registered() without return types