code: def test_should_raise_when_not_registered(self):
      # Given
      class MyBaseClass(Registrable):
          pass
  
      # When / Then
      with self.assertRaises(NotRegisteredError):
          MyBaseClass.by_name("my_unregistered_subclass")
  
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 2 for calling the TestRegistrable obj's underlying member method code with example usage: obj.test_should_raise_when_not_registered() without return types