code: def test_change_default_widgets():
      ProgressBar().execute(progress_fast())
  
      old = ProgressBar.DEFAULT_WIDGETS
      try:
          ProgressBar.DEFAULT_WIDGETS = MyWidgetFactory()
          ProgressBar().execute(progress_fast())
          lines = MyWidget.out.getvalue().splitlines()
          # print(lines)
          assert len(lines) > 2
          assert lines[0] == "init"
          assert float(lines[1]) < 1e-5
          assert lines[-1] == "done"
          assert float(lines[-2]) == 1.0
      finally:
          ProgressBar.DEFAULT_WIDGETS = old
  
imports: from io import StringIO
  import math
  import random
  import time
  from h2o.utils.progressbar import ProgressBar, ProgressBarWidget, PBWBar, PBWPercentage, PBWString, RenderResult
label_desc: Use image node_id 8 for calling a global function with example usage: test_change_default_widgets() without return types