code: def console_width(console, width):
      console_options = console.options
      original = console_options.max_width
      con_width = console._width
  
      try:
          console_options.max_width = width
          console._width = width
          yield
      finally:
          console_options.max_width = original
          console._width = con_width
  
file_path: dvc/tests/utils/__init__.py
imports: import csv
  import os
  from contextlib import contextmanager
  import pytest
  from funcy import first
  from dvc.scm import Git
label_desc: Use image node_id 5 for calling a global function with example usage: console_width(console, width) without return types