code: def _get_display_cls(format):
      """
      Get the appropriate IPython display class for `format`.
  
      Returns `IPython.display.SVG` if format=='svg', otherwise
      `IPython.display.Image`.
  
      If IPython is not importable, return dummy function that swallows its
      arguments and returns None.
      """
      dummy = lambda *args, **kwargs: None
      try:
          import IPython.display as display
      except ImportError:
          # Can't return a display object if no IPython.
          return dummy
  
      if format in IPYTHON_NO_DISPLAY_FORMATS:
          # IPython can't display this format natively, so just return None.
          return dummy
      elif format in IPYTHON_IMAGE_FORMATS:
          # Partially apply `format` so that `Image` and `SVG` supply a uniform
          # interface to the caller.
          return partial(display.Image, format=format)
      elif format == "svg":
          return display.SVG
      else:
          raise ValueError(
              "Unknown format '%s' passed to `dot_graph`" % format
          )
  
file_path: dask/dask/dot.py
imports: from __future__ import annotations
  import os
  import re
  from functools import partial
  from dask.core import get_dependencies, ishashable, istask
  from dask.utils import apply, funcname, import_required, key_split
label_desc: Use image node_id 7 for calling a global function with example usage: _get_display_cls(format) and returns: dummy, dummy, partial, display