code: def test_inheriting_repeat():
      from pybind11_tests import (
          A_Repeat,
          B_Repeat,
          C_Repeat,
          D_Repeat,
          A_Tpl,
          B_Tpl,
          C_Tpl,
          D_Tpl,
      )
  
      class AR(A_Repeat):
          def unlucky_number(self):
              return 99
  
      class AT(A_Tpl):
          def unlucky_number(self):
              return 999
  
      obj = AR()
      assert obj.say_something(3) == "hihihi"
      assert obj.unlucky_number() == 99
      assert obj.say_everything() == "hi 99"
  
      obj = AT()
      assert obj.say_something(3) == "hihihi"
      assert obj.unlucky_number() == 999
      assert obj.say_everything() == "hi 999"
  
      for obj in [B_Repeat(), B_Tpl()]:
          assert obj.say_something(3) == "B says hi 3 times"
          assert obj.unlucky_number() == 13
          assert obj.lucky_number() == 7.0
          assert obj.say_everything() == "B says hi 1 times 13"
  
      for obj in [C_Repeat(), C_Tpl()]:
          assert obj.say_something(3) == "B says hi 3 times"
          assert obj.unlucky_number() == 4444
          assert obj.lucky_number() == 888.0
          assert obj.say_everything() == "B says hi 1 times 4444"
  
      class CR(C_Repeat):
          def lucky_number(self):
              return C_Repeat.lucky_number(self) + 1.25
  
      obj = CR()
      assert obj.say_something(3) == "B says hi 3 times"
      assert obj.unlucky_number() == 4444
      assert obj.lucky_number() == 889.25
      assert obj.say_everything() == "B says hi 1 times 4444"
  
      class CT(C_Tpl):
          pass
  
      obj = CT()
      assert obj.say_something(3) == "B says hi 3 times"
      assert obj.unlucky_number() == 4444
      assert obj.lucky_number() == 888.0
      assert obj.say_everything() == "B says hi 1 times 4444"
  
      class CCR(CR):
          def lucky_number(self):
              return CR.lucky_number(self) * 10
  
      obj = CCR()
      assert obj.say_something(3) == "B says hi 3 times"
      assert obj.unlucky_number() == 4444
      assert obj.lucky_number() == 8892.5
      assert obj.say_everything() == "B says hi 1 times 4444"
  
      class CCT(CT):
          def lucky_number(self):
              return CT.lucky_number(self) * 1000
  
      obj = CCT()
      assert obj.say_something(3) == "B says hi 3 times"
      assert obj.unlucky_number() == 4444
      assert obj.lucky_number() == 888000.0
      assert obj.say_everything() == "B says hi 1 times 4444"
  
      class DR(D_Repeat):
          def unlucky_number(self):
              return 123
  
          def lucky_number(self):
              return 42.0
  
      for obj in [D_Repeat(), D_Tpl()]:
          assert obj.say_something(3) == "B says hi 3 times"
          assert obj.unlucky_number() == 4444
          assert obj.lucky_number() == 888.0
          assert obj.say_everything() == "B says hi 1 times 4444"
  
      obj = DR()
      assert obj.say_something(3) == "B says hi 3 times"
      assert obj.unlucky_number() == 123
      assert obj.lucky_number() == 42.0
      assert obj.say_everything() == "B says hi 1 times 123"
  
      class DT(D_Tpl):
          def say_something(self, times):
              return "DT says:" + (" quack" * times)
  
          def unlucky_number(self):
              return 1234
  
          def lucky_number(self):
              return -4.25
  
      obj = DT()
      assert obj.say_something(3) == "DT says: quack quack quack"
      assert obj.unlucky_number() == 1234
      assert obj.lucky_number() == -4.25
      assert obj.say_everything() == "DT says: quack 1234"
  
      class DT2(DT):
          def say_something(self, times):
              return "DT2: " + ("QUACK" * times)
  
          def unlucky_number(self):
              return -3
  
      class BT(B_Tpl):
          def say_something(self, times):
              return "BT" * times
  
          def unlucky_number(self):
              return -7
  
          def lucky_number(self):
              return -1.375
  
      obj = BT()
      assert obj.say_something(3) == "BTBTBT"
      assert obj.unlucky_number() == -7
      assert obj.lucky_number() == -1.375
      assert obj.say_everything() == "BT -7"
  
imports: import pytest
  import pybind11_tests
  from pybind11_tests import ConstructorStats
label_desc: Use image node_id 2 for calling a global function with example usage: test_inheriting_repeat() and returns: int, int, unknown, unknown, unknown, int, int, unknown, int, unknown, unknown, unknown, unknown, unknown, unknown