class_docstr: Context manager to temporarily set options in the `with` statement context.
  
  You need to invoke as ``option_context(pat, val, [(pat, val), ...])``.
  
  Examples
  --------
  >>> from pandas import option_context
  >>> with option_context('display.max_rows', 10, 'display.max_columns', 5):
  ...     pass
code: def __init__(self, *args) -> None:
      if len(args) % 2 != 0 or len(args) < 2:
          raise ValueError(
              "Need to invoke as option_context(pat, val, [(pat, val), ...])."
          )
  
      self.ops = list(zip(args[::2], args[1::2]))
  
imports: from __future__ import annotations
  from contextlib import ContextDecorator, contextmanager
  import re
  from typing import TYPE_CHECKING, Any, Callable, Generic, NamedTuple, cast
  import warnings
  from pandas._typing import F, T
  from pandas.util._exceptions import find_stack_level
label_desc: Use image node_id 1 to create a new option_context object from inherited base classes: ContextDecorator with example: obj = option_context()