code: def test_make_extension_unexpected_kwargs(self):
      with self.assertRaises(TypeError):
  
          @training.make_extension(foo=1)
          def my_extension(_):
              pass
  
file_path: chainer/tests/chainer_tests/training_tests/test_extension.py
imports: import unittest
  import pytest
  from chainer import testing
  from chainer import training
label_desc: Use image node_id 7 for calling the TestExtension obj's underlying member method code with example usage: obj.test_make_extension_unexpected_kwargs() without return types