code: def switch_matplot_backend(backend: str = "agg"):
      """Switch matplot backend."""
      previous = matplotlib.get_backend()
      plt.switch_backend(backend)
      yield
      plt.switch_backend(previous)
  
imports: import io
  import json
  import textwrap
  import typing
  from contextlib import contextmanager
  import matplotlib
  import matplotlib.pyplot
  import numpy
  import pandas
  import plotly.io._html
  from ipywidgets import DOMWidget
  from jsonpickle.pickler import Pickler
  from pandas.io.formats.style import Styler
  from plotly.io._utils import plotly_cdn_url
  from plotly.offline.offline import get_plotlyjs
  from deepchecks.core import check_result
  from deepchecks.core import errors
  from deepchecks.utils.dataframes import hide_index_for_display, un_numpy
  from deepchecks.utils.html import linktag
  from deepchecks.utils.strings import truncate_string
label_desc: Use image node_id 10 for calling a global function with example usage: switch_matplot_backend(backend) without return types