code: def test_stack_overflow():
      old = sys.getrecursionlimit()
      sys.setrecursionlimit(300)
      try:
          state = create()
          frame = None
  
          def f(i):
              if i == 0:
                  nonlocal frame
                  frame = sys._current_frames()[threading.get_ident()]
                  return
              else:
                  return f(i - 1)
  
          f(sys.getrecursionlimit() - 100)
          process(frame, None, state)
          assert state["children"]
          assert state["count"]
          assert merge(state, state, state)
  
      finally:
          sys.setrecursionlimit(old)
  
imports: from __future__ import annotations
  import dataclasses
  import sys
  import threading
  from collections.abc import Iterator, Sequence
  from time import sleep
  import pytest
  from tlz import first
  from distributed.compatibility import WINDOWS
  from distributed.metrics import time
  from distributed.profile import call_stack, create, identifier, info_frame, ll_get_stack, llprocess, lock, merge, plot_data, process, watch
label_desc: Use image node_id 11 for calling a global function with example usage: test_stack_overflow() and returns: f