code: def configure_printing(**kwargs):
      
      freeze = init_printing(_freeze=True, **kwargs)
      try:
          yield
      finally:
          for obj, attr_map in freeze.items():
              for attr, val in attr_map.items():
                  setattr(obj, attr, val)
docs: Context manager for temporarily changing the printing system.
  
      This takes the same parameters as :func:`init_printing`
  
      Example:
  
          >>> A = OperatorSymbol('A', hs=1); B = OperatorSymbol('B', hs=1)
          >>> with configure_printing(show_hs_label=False):
          ...     print(ascii(A + B))
          A + B
          >>> print(ascii(A + B))
          A^(1) + B^(1)