code: def stack_depth_of_caller() -> int:
      """Get stack size for caller's frame.
  
      From https://stackoverflow.com/a/47956089/9297601 , this is a simple
      but much faster alternative to `len(inspect.stack(0))`.  We use it
      with get/set recursionlimit to make stack overflows non-flaky; see
      https://github.com/HypothesisWorks/hypothesis/issues/2494 for details.
      """
      frame = sys._getframe(2)
      size = 1
      while frame:
          frame = frame.f_back  # type: ignore[assignment]
          size += 1
      return size
  
imports: import array
  import sys
  import warnings
  from random import Random
  from typing import Callable, Dict, Generic, Iterable, Iterator, List, Optional, Sequence, Tuple, TypeVar, Union, overload
  from hypothesis.errors import HypothesisWarning
label_desc: Use image node_id 7 for calling a global function with example usage: stack_depth_of_caller() and returns: size