code: def has_timed_out(self) -> bool:
      # SignalHandler is created by submitit as soon as the process start,
      # so _start_time is an accurate measure of the global runtime of the job.
      walltime = time.time() - self._start_time
      max_walltime = self._delayed._timeout_min * 60
      guaranteed_walltime = min(
          max_walltime * 0.8, max_walltime - 10 * 60
      )
  
      timed_out = walltime >= guaranteed_walltime
      if timed_out:
          self._logger.info(
              f"Job has timed out. Ran {walltime / 60:.0f} minutes out of requested {max_walltime / 60:.0f} minutes."
          )
      else:
          self._logger.info(
              f"Job has not timed out. Ran {walltime / 60:.0f} minutes out of requested {max_walltime / 60:.0f} minutes."
          )
      return timed_out
  
imports: import os
  import signal
  import socket
  import sys
  import time
  import types
  import typing
  from pathlib import Path
  from .None import logger, utils
  from .utils import DelayedSubmission, JobPaths
label_desc: Use image node_id 2 for calling the SignalHandler obj's underlying member method code with example usage: obj.has_timed_out() and returns: timed_out