code: def reraise(
      e: Exception,
      prefix: Optional[str] = None,
      suffix: Optional[str] = None,
  ) -> NoReturn:
      """Reraise an exception with an additional message."""
      prefix = prefix or ""
      suffix = "\n" + suffix if suffix else ""
  
      # If unsure about modifying the function inplace, create a new exception
      # and stack it in the chain.
      if (
          # Exceptions with custom error message
          type(e).__str__ is not BaseException.__str__
          # This should never happens unless the user plays with Exception
          # internals
          or not hasattr(e, "args")
          or not isinstance(e.args, tuple)
      ):
          msg = f"{prefix}{e}{suffix}"
          # Could try to dynamically create a
          # `type(type(e).__name__, (ReraisedError, type(e)), {})`, but should be
          # carefull when nesting `reraise` as well as compatibility with external
          # code.
          # Some base exception class (ImportError, OSError) and subclasses (
          # ModuleNotFoundError, FileNotFoundError) have custom `__str__` error
          # message. We re-raise those with same type to allow except in caller code.
          if isinstance(e, (ImportError, OSError)):
              exception = type(e)(msg)
          else:
              exception = RuntimeError(f"{type(e).__name__}: {msg}")
          raise exception from e
      # Otherwise, modify the exception in-place
      elif len(e.args) <= 1:
          exception_msg = e.args[0] if e.args else ""
          e.args = (f"{prefix}{exception_msg}{suffix}",)
          raise  # pylint: disable=misplaced-bare-raise
      # If there is more than 1 args, concatenate the message with other args
      else:
          e.args = tuple(
              p
              for p in (prefix,) + e.args + (suffix,)
              if not isinstance(p, str) or p
          )
          raise
  
imports: import base64
  import contextlib
  import functools
  import io
  import itertools
  import logging
  import os
  import random
  import re
  import shutil
  import string
  import sys
  import textwrap
  import threading
  import typing
  from typing import Any, Callable, Dict, Iterator, List, NoReturn, Optional, Tuple, Type, TypeVar, Union
  import uuid
  from absl import logging
  from etils import epath
  from six.moves import urllib
  from tensorflow_datasets.core import constants
  from tensorflow_datasets.core.utils import type_utils
label_desc: Use image node_id 20 for calling a global function with example usage: reraise(e, prefix, suffix) without return types