code: def maybe_periodic_stacktraces(debug_enabled: bool) -> Iterator[None]:
      if debug_enabled:
          faulthandler.dump_traceback_later(30, repeat=True)
      try:
          yield
      finally:
          if debug_enabled:
              faulthandler.cancel_dump_traceback_later()
  
file_path: determined/harness/determined/exec/harness.py
imports: import argparse
  import contextlib
  import faulthandler
  import logging
  import sys
  from typing import Iterator, Optional, Type
  import determined
  from determined import core, horovod, load
  from determined.common.api import analytics, certs
label_desc: Use image node_id 1 for calling a global function with example usage: maybe_periodic_stacktraces(debug_enabled) without return types