code: def printProgress(stop):
      states = [" | ", " / ", " — ", " \\ "]
      nextc = 0
      while True:
          sys.stdout.write("\r[{}]".format(states[nextc]))
          sys.stdout.flush()
          time.sleep(2.5)
          nextc = nextc + 1 if nextc < 3 else 0
          if stop():
              sys.stdout.write("\r[{}]".format("OK!"))
              sys.stdout.flush()
              break
  
      sys.stdout.write("\n")
      return
  
label_desc: Use image node_id 1 for calling a global function with example usage: printProgress(stop) without return types