def get_wf_graph_png(self, host, port, db_name, vt_id, version, is_local=True):
        self.server_logger.info("get_wf_graph_png(%s,%s,%s,%s,%s) request received" % \
                                (host, port, db_name, vt_id, version))
        try:
            vt_id = long(vt_id)
            version = long(version)
            subdir = 'workflows'
            filepath = os.path.join(media_dir, 'graphs', subdir)
            base_fname = "graph_%s_%s.png" % (vt_id, version)
            filename = os.path.join(filepath,base_fname)
            if ((not os.path.exists(filepath) or
                os.path.exists(filepath) and not os.path.exists(filename))
                and self.proxies_queue is not None):
                #this server can send requests to other instances
                proxy = self.proxies_queue.get()
                try:
                    self.server_logger.info("Sending request to %s" % proxy)
                    result = proxy.get_wf_graph_png(host, port, db_name, vt_id, version, is_local)
                    self.proxies_queue.put(proxy)
                    self.server_logger.info("returning %s" % result)
                    return result
                except xmlrpclib.ProtocolError, err:
                    err_msg = ("A protocol error occurred\n"
                               "URL: %s\n"
                               "HTTP/HTTPS headers: %s\n"
                               "Error code: %d\n"
                               "Error message: %s\n") % (err.url, err.headers,
                                                         err.errcode, err.errmsg)
                    self.server_logger.error(err_msg)
                    return (str(err), 0)
                except Exception, e:
                    self.server_logger.error(str(e))
                    self.server_logger.error(traceback.format_exc())
                    return (str(e), 0)
            #if it gets here, this means that we will execute on this instance
            if not os.path.exists(filepath):
                os.mkdir(filepath)

            if not os.path.exists(filename):
                from vistrails.gui.vistrail_controller import VistrailController

                locator = DBLocator(host=host,
                                    port=port,
                                    database=db_name,
                                    user=db_read_user,
                                    passwd=db_read_pass,
                                    obj_id=int(vt_id),
                                    obj_type=None,
                                    connection_id=None)
                (v, abstractions , thumbnails, mashups)  = io.load_vistrail(locator)
                controller = VistrailController(v, locator, abstractions, 
                                                thumbnails, mashups)
                controller.change_selected_version(version)
                controller.updatePipelineScene()
                controller.current_pipeline_scene.saveToPNG(filename)
            else:
                self.server_logger.info("found cached image: %s" % filename)
            if is_local:
                return (os.path.join(subdir,base_fname), 1)
            else:
                f = open(filename, 'rb')
                contents = f.read()
                f.close()
                return (xmlrpclib.Binary(contents), 1)
        except xmlrpclib.ProtocolError, err:
            err_msg = ("A protocol error occurred\n"
                       "URL: %s\n"
                       "HTTP/HTTPS headers: %s\n"
                       "Error code: %d\n"
                       "Error message: %s\n") % (err.url, err.headers,
                                                 err.errcode, err.errmsg)
            self.server_logger.error(err_msg)
            return (str(err), 0)
        except Exception, e:
            self.server_logger.error("Error when saving png %s" % str(e))
            self.server_logger.error(traceback.format_exc())
            return (str(e), 0)
get_wf_graph_png(host:str, port:int, db_name:str, vt_id:int,
dataset/ETHPy150Open VisTrails/VisTrails/vistrails/gui/application_server.py/RequestHandler.get_wf_graph_png