parameters: ()
docstring: Returns True if PyDot and Graphviz are available.
docstring_summary: Returns True if PyDot and Graphviz are available.
docstring_tokens: Returns True if PyDot and Graphviz are available .
function: def check_pydot():
    """Returns True if PyDot and Graphviz are available."""
    if pydot is None:
      return False
    try:
      # Attempt to create an image of a blank graph
      # to check the pydot/graphviz installation.
      pydot.Dot.create(pydot.Dot())
      return True
    except (OSError, pydot.InvocationException):
      return False
function_tokens: def check_pydot ( ) : if pydot is None : return False try : # Attempt to create an image of a blank graph # to check the pydot/graphviz installation. pydot . Dot . create ( pydot . Dot ( ) ) return True except ( OSError , pydot . InvocationException ) : return False