def _get_display_cls(format):
 dummy = (lambda *args, **kwargs: None)
 try:
  import IPython.display as display
 except ImportError:
  return dummy
 if (format in IPYTHON_NO_DISPLAY_FORMATS):
  return dummy
 elif (format in IPYTHON_IMAGE_FORMATS):
  return partial(display.Image, format=format)
 elif (format == 'svg'):
  return display.SVG
 else:
  raise ValueError(("Unknown format '%s' passed to `dot_graph`" % format))

def _get_display_cls ( format ) : dummy = ( lambda * args , ** kwargs : None ) try : import IPython . display as display except ImportError : return dummy if ( format in IPYTHON_NO_DISPLAY_FORMATS ) : return dummy elif ( format in IPYTHON_IMAGE_FORMATS ) : return partial ( display . Image , format = format ) elif ( format == 'svg' ) : return display . SVG else : raise ValueError ( ( "Unknown format '%s' passed to `dot_graph`" % format ) )
get the appropriate ipython display class for format .