code: def printer_context(printer, **kwargs):
      original = printer._context.copy()
      try:
          printer._context.update(kwargs)
          yield
      finally:
          printer._context = original
  
imports: from __future__ import annotations
  import sys
  from typing import Any, Type
  import inspect
  from contextlib import contextmanager
  from functools import cmp_to_key, update_wrapper
  from sympy.core.add import Add
  from sympy.core.basic import Basic
  from sympy.core.function import AppliedUndef, UndefinedFunction, Function
label_desc: Use image node_id 1 for calling a global function with example usage: printer_context(printer) without return types