code: def timed_run(
      f: FunctionType, timeout_seconds: int = 3600
  ) -> Tuple[Any, Number, bool]:
      """Runs the function with time limit.
  
      Args:
          f (FunctionType): Function to call.
          timeout_seconds (int, optional): Timeout in seconds. Defaults to 3600.
  
      Returns:
          Tuple[Any, Number, bool]: Function response, duration, has timed out.
      """
      start_time = time.time()
      with Timeout(timeout_seconds) as timeout_ctx:
          res = f()
      duration = time.time() - start_time
  
      timed_out = timeout_ctx.state == timeout_ctx.TIMED_OUT
      if timed_out:
          res = None
      return res, duration, timed_out
  
file_path: interpret/python/powerlift/src/powerlift/executors/base.py
imports: from numbers import Number
  import time
  from types import FunctionType
  from typing import Any, Iterable, Tuple
  from stopit import ThreadingTimeout
label_desc: Use image node_id 1 for calling a global function with example usage: timed_run(f, timeout_seconds) and returns: res,  duration,  timed_out