code: def timeout_signal(time_in_seconds):
      global _timeout_state
      _timeout_state = False
  
      def handler(signum, frame):
          global _timeout_state
          _timeout_state = True
          hl.stop()
          hl.init(**_init_args)
          raise BenchmarkTimeoutError()
  
      signal.signal(signal.SIGALRM, handler)
      signal.alarm(time_in_seconds)
  
      try:
          yield
      finally:
  
          def no_op(signum, frame):
              pass
  
          signal.signal(signal.SIGALRM, no_op)
          signal.alarm(0)
  
imports: import timeit
  import contextlib
  import hail
  import logging
  import os
  import re
  import shutil
  import signal
  from py4j.protocol import Py4JError
  from .resources import all_resources
label_desc: Use image node_id 2 for calling a global function with example usage: timeout_signal(time_in_seconds) without return types