class_docstr: Create `pydot` graph object from Theano function.
  
  Parameters
  ----------
  compact : bool
      if True, will remove intermediate variables without name.
  
  Attributes
  ----------
  node_colors : dict
      Color table of node types.
  apply_colors : dict
      Color table of apply nodes.
  shapes : dict
      Shape table of node types.
class_docstr_tok: ["Create","`","pydot","`","graph","object","from","Theano","function",".","Parameters","--","--","--","--","--","compact",":","bool","if","True",",","will","remove","intermediate","variables","without","name",".","Attributes","--","--","--","--","--","node_colors",":","dict","Color","table","of","node","types",".","apply_colors",":","dict","Color","table","of","apply","nodes",".","shapes",":","dict","Shape","table","of","node","types","."]
docstr: Construct PyDotFormatter object.
docstr_tok: ["Construct","PyDotFormatter","object","."]
code: def __init__(self, compact=True):
      """Construct PyDotFormatter object."""
      if not pydot_imported:
          raise ImportError(
              "Failed to import pydot. " + pydot_imported_msg
          )
  
      self.compact = compact
      self.node_colors = {
          "input": "limegreen",
          "constant_input": "SpringGreen",
          "shared_input": "YellowGreen",
          "output": "dodgerblue",
          "unused": "lightgrey",
      }
      self.apply_colors = {
          "GpuFromHost": "red",
          "HostFromGpu": "red",
          "Scan": "yellow",
          "Shape": "cyan",
          "IfElse": "magenta",
          "Elemwise": "#FFAABB",  # dark pink
          "Subtensor": "#FFAAFF",  # purple
          "Alloc": "#FFAA22",
      }  # orange
      self.shapes = {
          "input": "box",
          "output": "box",
          "apply": "ellipse",
      }
      self.__node_prefix = "n"
  
imports: from __future__ import absolute_import, print_function, division
  import numpy
  import os
  from functools import reduce
  from six import iteritems, itervalues
  import theano
  from theano import gof
  from theano.compile import Function
  from theano.compile import builders
  from theano.printing import pydot_imported, pydot_imported_msg
label_desc: Use image node_id 1 to create a new PyDotFormatter object from inherited base classes: object with example: obj = PyDotFormatter(compact)