code: def override_mode(override: BackendMode):
      # pylint: disable=g-doc-return-or-yield
      """Returns a context manager that changes backend IO mode.
      Args:
        override: BackendMode enum value to set IO mode inside context.
      """
      # pylint: enable=g-doc-return-or-yield
      global io_mode
      io_mode_prev = io_mode
      io_mode = override
      try:
          yield
      finally:
          io_mode = io_mode_prev
  
imports: import contextlib
  import glob
  import importlib
  import os
  import shutil
  from enum import Enum
  from absl import logging
  from .None import errors
label_desc: Use image node_id 1 for calling a global function with example usage: override_mode(override) without return types