code: def temp_flip_flag(var_name: str, var_value: bool):
      """Context manager to temporarily flip feature flags for test functions.
  
      Args:
        var_name: the config variable name (without the 'flax_' prefix)
        var_value: the boolean value to set var_name to temporarily
      """
      old_value = getattr(config, f"flax_{var_name}")
      try:
          config.update(f"flax_{var_name}", var_value)
          yield
      finally:
          config.update(f"flax_{var_name}", old_value)
  
file_path: flax/flax/configurations.py
imports: import os
  from contextlib import contextmanager
  from typing import Any, Generic, NoReturn, TypeVar, overload
label_desc: Use image node_id 3 for calling a global function with example usage: temp_flip_flag(var_name, var_value) without return types