code: def test_nt_and_posix_stack_size(self):
      try:
          thread.stack_size(4096)
      except ValueError:
          verbose_print(
              "caught expected ValueError setting " "stack_size(4096)"
          )
      except thread.error:
          self.skipTest(
              "platform does not support changing thread stack " "size"
          )
  
      fail_msg = "stack_size(%d) failed - should succeed"
      for tss in (262144, 0x100000, 0):
          thread.stack_size(tss)
          self.assertEqual(thread.stack_size(), tss, fail_msg % tss)
          verbose_print("successfully set stack_size(%d)" % tss)
  
      for tss in (262144, 0x100000):
          verbose_print("trying stack_size = (%d)" % tss)
          self.next_ident = 0
          self.created = 0
          with threading_helper.wait_threads_exit():
              for i in range(NUMTASKS):
                  self.newtask()
  
              verbose_print("waiting for all tasks to complete")
              self.done_mutex.acquire()
              verbose_print("all tasks done")
  
      thread.stack_size(0)
  
imports: import os
  import unittest
  import random
  from test import support
  from test.support import threading_helper
  import _thread
  import time
  import warnings
  import weakref
  from test import lock_tests
label_desc: Use image node_id 5 for calling the ThreadRunningTests obj's underlying member method code with example usage: obj.test_nt_and_posix_stack_size() without return types