def test_undecorated_task(self):
    """Simple test to verify that we can register tasks at runtime."""
    # Register the task.
    task_registry.register_task('undecorated_task')(UnDecoratedTask)

    # Retrieve it.
    task_name = task_registry.get_registered_task('undecorated_task')
    self.assertIsNotNone(task_name)
    self.assertEqual(task_name.__name__, 'UnDecoratedTask')

    # Verify that we can still access previously registerd decorated layers.
    task_name = task_registry.get_registered_task('decorated_task')
    self.assertIsNotNone(task_name)
    self.assertEqual(task_name.__name__, 'DecoratedTask')
Simple test to verify that we can register tasks at runtime.
language/mentionmemory/tasks/task_registry_test.py