def METHOD_NAME(self):
    # Decoder is not allowed to be None
    with self.assertRaises(AssertionError):
        EncoderDecoderRecognizer()
    for attr in ['backbone', 'preprocessor', 'encoder']:
        recognizer = EncoderDecoderRecognizer(
            **{
                attr: dict(type='DummyModule', value=1),
                'decoder': dict(type='DummyModule', value=2)
            })
        self.assertTrue(hasattr(recognizer, attr))
        self.assertFalse(
            any(
                hasattr(recognizer, t)
                for t in ['backbone', 'preprocessor', 'encoder']
                if t != attr))