code: def test_closures(self):
      def f(x, y):
          def g(x2, /, y2):
              return x + y + x2 + y2
  
          return g
  
      self.assertEqual(f(1, 2)(3, 4), 10)
      with self.assertRaisesRegex(
          TypeError,
          r"g\(\) missing 1 required positional argument: 'y2'",
      ):
          f(1, 2)(3)
      with self.assertRaisesRegex(
          TypeError,
          r"g\(\) takes 2 positional arguments but 3 were given",
      ):
          f(1, 2)(3, 4, 5)
  
      def f(x, /, y):
          def g(x2, y2):
              return x + y + x2 + y2
  
          return g
  
      self.assertEqual(f(1, 2)(3, 4), 10)
  
      def f(x, /, y):
          def g(x2, /, y2):
              return x + y + x2 + y2
  
          return g
  
      self.assertEqual(f(1, 2)(3, 4), 10)
      with self.assertRaisesRegex(
          TypeError,
          r"g\(\) missing 1 required positional argument: 'y2'",
      ):
          f(1, 2)(3)
      with self.assertRaisesRegex(
          TypeError,
          r"g\(\) takes 2 positional arguments but 3 were given",
      ):
          f(1, 2)(3, 4, 5)
  
imports: import dis
  import pickle
  import unittest
  from test.support import check_syntax_error
label_desc: Use image node_id 20 for calling the PositionalOnlyTestCase obj's underlying member method code with example usage: obj.test_closures() and returns: g, g, g, unknown, unknown, unknown