code: def _catch_sys_exit() -> Any:
      try:
          yield
      except SystemExit as e:
          raise det.errors.InvalidExperimentException(
              "Caught a SystemExit exception. "
              "This might be raised by directly calling or using a library calling sys.exit(). "
              "Please remove any calls to sys.exit() from your model code."
          ) from e
  
imports: import contextlib
  import logging
  import math
  import os
  import pathlib
  import random
  import sys
  import uuid
  from typing import Any, Dict, Iterator, List, Optional, Tuple, Type
  import determined
  from determined import constants, core, gpu, load
label_desc: Use image node_id 2 for calling a global function with example usage: _catch_sys_exit() without return types