code: def d3write(fct, path, *args, **kwargs):
      """Convert Theano graph to pydot graph and write to dot file.
  
      Parameters
      ----------
      fct : theano.compile.function_module.Function
          A compiled Theano function, variable, apply or a list of variables.
      path: str
          Path to output file
  
      Notes
      -----
      This function accepts extra parameters which will be forwarded to
      :class:`theano.d3viz.formatting.PyDotFormatter`.
  
      """
  
      formatter = PyDotFormatter(*args, **kwargs)
      graph = formatter(fct)
      graph.write_dot(path)
  
file_path: Theano/theano/d3viz/d3viz.py
imports: from __future__ import absolute_import, print_function, division
  import os
  import json
  import shutil
  import six
  from six import iteritems
  from theano.d3viz.formatting import PyDotFormatter
label_desc: Use image node_id 4 for calling a global function with example usage: d3write(fct, path) without return types