code: def test_kwonly_methods(self):
      class Example:
          def f(self, *, k1=1, k2=2):
              return k1, k2
  
      self.assertEqual(Example().f(k1=1, k2=2), (1, 2))
      self.assertEqual(Example.f(Example(), k1=1, k2=2), (1, 2))
      self.assertRaises(TypeError, Example.f, k1=1, k2=2)
  
imports: import unittest
label_desc: Use image node_id 9 for calling the KeywordOnlyArgTestCase obj's underlying member method code with example usage: obj.test_kwonly_methods() and returns: k1,  k2