code: def context(msg_fn: Callable[[], str]) -> Iterator[None]:
      try:
          yield
      except Exception as e:
          # TODO: this does the wrong thing with KeyError
          msg = msg_fn()
          msg = textwrap.indent(msg, "  ")
          msg = f"{e.args[0]}\n{msg}" if e.args else msg
          e.args = (msg,) + e.args[1:]
          raise
  
imports: import contextlib
  import functools
  import hashlib
  import os
  import re
  import sys
  import textwrap
  from argparse import Namespace
  from dataclasses import fields, is_dataclass
  from enum import auto, Enum
  from typing import Any, Callable, Dict, Generic, Iterable, Iterator, List, Literal, NoReturn, Optional, Sequence, Set, Tuple, TypeVar, Union
  from typing_extensions import Self
  from torchgen.code_template import CodeTemplate
label_desc: Use image node_id 4 for calling a global function with example usage: context(msg_fn) without return types