Skip to content
Snippets Groups Projects
test_dot_printer.ipynb 19.2 KiB
Newer Older
Markus Holzer's avatar
Markus Holzer committed
{
 "cells": [
Michael Kuron's avatar
Michael Kuron committed
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "import pytest\n",
    "pytest.importorskip('graphviz')"
   ]
  },
Markus Holzer's avatar
Markus Holzer committed
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "from pystencils.session import *\n",
    "from pystencils.astnodes import Block, Conditional"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "src, dst = ps.fields(\"src, dst: double[2D]\", layout='c')\n",
    "\n",
    "true_block = Block([ps.Assignment(dst[0, 0], src[-1, 0])])\n",
    "false_block = Block([ps.Assignment(dst[0, 0], src[1, 0])])\n",
    "ur = [true_block, Conditional(dst.center() > 0.0, true_block, false_block)]\n",
    "    \n",
    "ast = ps.create_kernel(ur)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "scrolled": false
   },
   "outputs": [
    {
     "data": {
      "image/svg+xml": [
       "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n",
       "<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n",
       " \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n",
       "<!-- Generated by graphviz version 2.40.1 (20161225.0304)\n",
       " -->\n",
       "<!-- Title: %3 Pages: 1 -->\n",
       "<svg width=\"684pt\" height=\"290pt\"\n",
       " viewBox=\"0.00 0.00 684.00 289.51\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n",
       "<g id=\"graph0\" class=\"graph\" transform=\"scale(.4128 .4128) rotate(0) translate(4 697.3797)\">\n",
       "<title>%3</title>\n",
       "<polygon fill=\"#ffffff\" stroke=\"transparent\" points=\"-4,4 -4,-697.3797 1653.0784,-697.3797 1653.0784,4 -4,4\"/>\n",
       "<!-- 140060050351120 -->\n",
       "<g id=\"node1\" class=\"node\">\n",
       "<title>140060050351120</title>\n",
       "<ellipse fill=\"#a056db\" stroke=\"#000000\" cx=\"243.1436\" cy=\"-675.3797\" rx=\"111.5806\" ry=\"18\"/>\n",
       "<text text-anchor=\"middle\" x=\"243.1436\" y=\"-671.6797\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">Func: kernel (dst,src)</text>\n",
       "</g>\n",
       "<!-- 140060034299536 -->\n",
       "<g id=\"node19\" class=\"node\">\n",
       "<title>140060034299536</title>\n",
       "<ellipse fill=\"#dbc256\" stroke=\"#000000\" cx=\"243.1436\" cy=\"-603.3797\" rx=\"37.0935\" ry=\"18\"/>\n",
       "<text text-anchor=\"middle\" x=\"243.1436\" y=\"-599.6797\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">Block</text>\n",
       "</g>\n",
       "<!-- 140060050351120&#45;&gt;140060034299536 -->\n",
       "<g id=\"edge18\" class=\"edge\">\n",
       "<title>140060050351120&#45;&gt;140060034299536</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M243.1436,-657.2111C243.1436,-649.5107 243.1436,-640.3541 243.1436,-631.7964\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"246.6437,-631.793 243.1436,-621.793 239.6437,-631.793 246.6437,-631.793\"/>\n",
       "</g>\n",
       "<!-- 140060034299984 -->\n",
       "<g id=\"node2\" class=\"node\">\n",
       "<title>140060034299984</title>\n",
       "<ellipse fill=\"#3498db\" stroke=\"#000000\" cx=\"243.1436\" cy=\"-531.3797\" rx=\"86.3847\" ry=\"18\"/>\n",
       "<text text-anchor=\"middle\" x=\"243.1436\" y=\"-527.6797\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">Loop over dim 0</text>\n",
       "</g>\n",
       "<!-- 140060034299664 -->\n",
       "<g id=\"node18\" class=\"node\">\n",
       "<title>140060034299664</title>\n",
       "<ellipse fill=\"#dbc256\" stroke=\"#000000\" cx=\"243.1436\" cy=\"-459.3797\" rx=\"37.0935\" ry=\"18\"/>\n",
       "<text text-anchor=\"middle\" x=\"243.1436\" y=\"-455.6797\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">Block</text>\n",
       "</g>\n",
       "<!-- 140060034299984&#45;&gt;140060034299664 -->\n",
       "<g id=\"edge16\" class=\"edge\">\n",
       "<title>140060034299984&#45;&gt;140060034299664</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M243.1436,-513.2111C243.1436,-505.5107 243.1436,-496.3541 243.1436,-487.7964\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"246.6437,-487.793 243.1436,-477.793 239.6437,-487.793 246.6437,-487.793\"/>\n",
       "</g>\n",
       "<!-- 140060034380240 -->\n",
       "<g id=\"node3\" class=\"node\">\n",
       "<title>140060034380240</title>\n",
       "<ellipse fill=\"#56db7f\" stroke=\"#000000\" cx=\"72.1436\" cy=\"-387.3797\" rx=\"72.2875\" ry=\"18\"/>\n",
       "<text text-anchor=\"middle\" x=\"72.1436\" y=\"-383.6797\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">_data_dst_00</text>\n",
       "</g>\n",
       "<!-- 140060034381584 -->\n",
       "<g id=\"node4\" class=\"node\">\n",
       "<title>140060034381584</title>\n",
       "<ellipse fill=\"#56db7f\" stroke=\"#000000\" cx=\"243.1436\" cy=\"-387.3797\" rx=\"81.4863\" ry=\"18\"/>\n",
       "<text text-anchor=\"middle\" x=\"243.1436\" y=\"-383.6797\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">_data_src_0m1</text>\n",
       "</g>\n",
       "<!-- 140060034300688 -->\n",
       "<g id=\"node5\" class=\"node\">\n",
       "<title>140060034300688</title>\n",
       "<ellipse fill=\"#3498db\" stroke=\"#000000\" cx=\"429.1436\" cy=\"-387.3797\" rx=\"86.3847\" ry=\"18\"/>\n",
       "<text text-anchor=\"middle\" x=\"429.1436\" y=\"-383.6797\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">Loop over dim 1</text>\n",
       "</g>\n",
       "<!-- 140060034298960 -->\n",
       "<g id=\"node17\" class=\"node\">\n",
       "<title>140060034298960</title>\n",
       "<ellipse fill=\"#dbc256\" stroke=\"#000000\" cx=\"429.1436\" cy=\"-315.3797\" rx=\"37.0935\" ry=\"18\"/>\n",
       "<text text-anchor=\"middle\" x=\"429.1436\" y=\"-311.6797\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">Block</text>\n",
       "</g>\n",
       "<!-- 140060034300688&#45;&gt;140060034298960 -->\n",
       "<g id=\"edge12\" class=\"edge\">\n",
       "<title>140060034300688&#45;&gt;140060034298960</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M429.1436,-369.2111C429.1436,-361.5107 429.1436,-352.3541 429.1436,-343.7964\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"432.6437,-343.793 429.1436,-333.793 425.6437,-343.793 432.6437,-343.793\"/>\n",
       "</g>\n",
       "<!-- 140060034298192 -->\n",
       "<g id=\"node6\" class=\"node\">\n",
       "<title>140060034298192</title>\n",
       "<ellipse fill=\"#56db7f\" stroke=\"#000000\" cx=\"203.1436\" cy=\"-202.6899\" rx=\"170.8697\" ry=\"18\"/>\n",
       "<text text-anchor=\"middle\" x=\"203.1436\" y=\"-198.9899\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">_data_dst_00[_stride_dst_1*ctr_1]</text>\n",
       "</g>\n",
       "<!-- 140060165603728 -->\n",
       "<g id=\"node7\" class=\"node\">\n",
       "<title>140060165603728</title>\n",
       "<ellipse fill=\"#dbc256\" stroke=\"#000000\" cx=\"429.1436\" cy=\"-202.6899\" rx=\"37.0935\" ry=\"18\"/>\n",
       "<text text-anchor=\"middle\" x=\"429.1436\" y=\"-198.9899\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">Block</text>\n",
       "</g>\n",
       "<!-- 140060034299472 -->\n",
       "<g id=\"node8\" class=\"node\">\n",
       "<title>140060034299472</title>\n",
       "<ellipse fill=\"#56bd7f\" stroke=\"#000000\" cx=\"857.1436\" cy=\"-202.6899\" rx=\"372.7906\" ry=\"58.8803\"/>\n",
       "<text text-anchor=\"middle\" x=\"857.1436\" y=\"-228.9899\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">else: </text>\n",
       "<text text-anchor=\"middle\" x=\"857.1436\" y=\"-213.9899\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">\tBlock _data_dst_00 ← _data_dst + _stride_dst_0*ctr_0</text>\n",
       "<text text-anchor=\"middle\" x=\"857.1436\" y=\"-198.9899\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">_data_src_01 ← _data_src + _stride_src_0*ctr_0 + _stride_src_0</text>\n",
       "<text text-anchor=\"middle\" x=\"857.1436\" y=\"-183.9899\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">_data_dst_00[_stride_dst_1*ctr_1] ← _data_src_01[_stride_src_1*ctr_1]</text>\n",
       "<text text-anchor=\"middle\" x=\"857.1436\" y=\"-168.9899\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\"> </text>\n",
       "</g>\n",
       "<!-- 140060037556304 -->\n",
       "<g id=\"node12\" class=\"node\">\n",
       "<title>140060037556304</title>\n",
       "<ellipse fill=\"#dbc256\" stroke=\"#000000\" cx=\"659.1436\" cy=\"-90\" rx=\"37.0935\" ry=\"18\"/>\n",
       "<text text-anchor=\"middle\" x=\"659.1436\" y=\"-86.3\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">Block</text>\n",
       "</g>\n",
       "<!-- 140060034299472&#45;&gt;140060037556304 -->\n",
       "<g id=\"edge4\" class=\"edge\">\n",
       "<title>140060034299472&#45;&gt;140060037556304</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M757.5635,-146.0148C733.9458,-132.573 710.3721,-119.1562 692.2192,-108.8247\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"693.6713,-105.624 683.249,-103.7194 690.2088,-111.7077 693.6713,-105.624\"/>\n",
       "</g>\n",
       "<!-- 140060034298640 -->\n",
       "<g id=\"node16\" class=\"node\">\n",
       "<title>140060034298640</title>\n",
       "<ellipse fill=\"#dbc256\" stroke=\"#000000\" cx=\"1136.1436\" cy=\"-90\" rx=\"37.0935\" ry=\"18\"/>\n",
       "<text text-anchor=\"middle\" x=\"1136.1436\" y=\"-86.3\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">Block</text>\n",
       "</g>\n",
       "<!-- 140060034299472&#45;&gt;140060034298640 -->\n",
       "<g id=\"edge8\" class=\"edge\">\n",
       "<title>140060034299472&#45;&gt;140060034298640</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M992.5572,-147.9955C1031.2605,-132.3629 1070.3836,-116.5609 1097.9961,-105.408\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"1099.6649,-108.5088 1107.6263,-101.5183 1097.0432,-102.0182 1099.6649,-108.5088\"/>\n",
       "</g>\n",
       "<!-- 140060034382224 -->\n",
       "<g id=\"node9\" class=\"node\">\n",
       "<title>140060034382224</title>\n",
       "<ellipse fill=\"#56db7f\" stroke=\"#000000\" cx=\"353.1436\" cy=\"-18\" rx=\"72.2875\" ry=\"18\"/>\n",
       "<text text-anchor=\"middle\" x=\"353.1436\" y=\"-14.3\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">_data_dst_00</text>\n",
       "</g>\n",
       "<!-- 140060044051536 -->\n",
       "<g id=\"node10\" class=\"node\">\n",
       "<title>140060044051536</title>\n",
       "<ellipse fill=\"#56db7f\" stroke=\"#000000\" cx=\"524.1436\" cy=\"-18\" rx=\"81.4863\" ry=\"18\"/>\n",
       "<text text-anchor=\"middle\" x=\"524.1436\" y=\"-14.3\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">_data_src_0m1</text>\n",
       "</g>\n",
       "<!-- 140060034298704 -->\n",
       "<g id=\"node11\" class=\"node\">\n",
       "<title>140060034298704</title>\n",
       "<ellipse fill=\"#56db7f\" stroke=\"#000000\" cx=\"794.1436\" cy=\"-18\" rx=\"170.8697\" ry=\"18\"/>\n",
       "<text text-anchor=\"middle\" x=\"794.1436\" y=\"-14.3\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">_data_dst_00[_stride_dst_1*ctr_1]</text>\n",
       "</g>\n",
       "<!-- 140060037556304&#45;&gt;140060034382224 -->\n",
       "<g id=\"edge1\" class=\"edge\">\n",
       "<title>140060037556304&#45;&gt;140060034382224</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M625.5209,-82.0888C575.1201,-70.2298 479.132,-47.6443 415.6277,-32.7021\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"416.2623,-29.256 405.7265,-30.3724 414.659,-36.0699 416.2623,-29.256\"/>\n",
       "</g>\n",
       "<!-- 140060037556304&#45;&gt;140060044051536 -->\n",
       "<g id=\"edge2\" class=\"edge\">\n",
       "<title>140060037556304&#45;&gt;140060044051536</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M634.0675,-76.6261C614.6322,-66.2606 587.3057,-51.6865 564.7614,-39.6628\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"566.2191,-36.4736 555.7485,-34.8559 562.9249,-42.6501 566.2191,-36.4736\"/>\n",
       "</g>\n",
       "<!-- 140060037556304&#45;&gt;140060034298704 -->\n",
       "<g id=\"edge3\" class=\"edge\">\n",
       "<title>140060037556304&#45;&gt;140060034298704</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M684.2197,-76.6261C703.1859,-66.5108 729.6668,-52.3876 751.8851,-40.5378\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"753.6187,-43.58 760.7951,-35.7858 750.3245,-37.4035 753.6187,-43.58\"/>\n",
       "</g>\n",
       "<!-- 140060034383312 -->\n",
       "<g id=\"node13\" class=\"node\">\n",
       "<title>140060034383312</title>\n",
       "<ellipse fill=\"#56db7f\" stroke=\"#000000\" cx=\"1055.1436\" cy=\"-18\" rx=\"72.2875\" ry=\"18\"/>\n",
       "<text text-anchor=\"middle\" x=\"1055.1436\" y=\"-14.3\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">_data_dst_00</text>\n",
       "</g>\n",
       "<!-- 140060034383184 -->\n",
       "<g id=\"node14\" class=\"node\">\n",
       "<title>140060034383184</title>\n",
       "<ellipse fill=\"#56db7f\" stroke=\"#000000\" cx=\"1217.1436\" cy=\"-18\" rx=\"72.2875\" ry=\"18\"/>\n",
       "<text text-anchor=\"middle\" x=\"1217.1436\" y=\"-14.3\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">_data_src_01</text>\n",
       "</g>\n",
       "<!-- 140060034776592 -->\n",
       "<g id=\"node15\" class=\"node\">\n",
       "<title>140060034776592</title>\n",
       "<ellipse fill=\"#56db7f\" stroke=\"#000000\" cx=\"1478.1436\" cy=\"-18\" rx=\"170.8697\" ry=\"18\"/>\n",
       "<text text-anchor=\"middle\" x=\"1478.1436\" y=\"-14.3\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">_data_dst_00[_stride_dst_1*ctr_1]</text>\n",
       "</g>\n",
       "<!-- 140060034298640&#45;&gt;140060034383312 -->\n",
       "<g id=\"edge5\" class=\"edge\">\n",
       "<title>140060034298640&#45;&gt;140060034383312</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M1118.1671,-74.0209C1107.6147,-64.641 1094.0712,-52.6024 1082.2454,-42.0905\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"1084.5702,-39.4741 1074.7708,-35.4464 1079.9196,-44.706 1084.5702,-39.4741\"/>\n",
       "</g>\n",
       "<!-- 140060034298640&#45;&gt;140060034383184 -->\n",
       "<g id=\"edge6\" class=\"edge\">\n",
       "<title>140060034298640&#45;&gt;140060034383184</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M1154.1201,-74.0209C1164.6724,-64.641 1178.216,-52.6024 1190.0418,-42.0905\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"1192.3675,-44.706 1197.5164,-35.4464 1187.717,-39.4741 1192.3675,-44.706\"/>\n",
       "</g>\n",
       "<!-- 140060034298640&#45;&gt;140060034776592 -->\n",
       "<g id=\"edge7\" class=\"edge\">\n",
       "<title>140060034298640&#45;&gt;140060034776592</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M1170.1862,-82.8331C1221.3389,-72.0641 1319.6786,-51.3611 1391.5128,-36.2381\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"1392.4009,-39.6279 1401.4653,-34.1428 1390.9588,-32.778 1392.4009,-39.6279\"/>\n",
       "</g>\n",
       "<!-- 140060034298960&#45;&gt;140060034298192 -->\n",
       "<g id=\"edge9\" class=\"edge\">\n",
       "<title>140060034298960&#45;&gt;140060034298192</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M403.2185,-302.4528C365.3624,-283.5767 294.424,-248.2048 247.9919,-225.0525\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"249.2741,-221.7809 238.7631,-220.4507 246.1504,-228.0453 249.2741,-221.7809\"/>\n",
       "</g>\n",
       "<!-- 140060034298960&#45;&gt;140060165603728 -->\n",
       "<g id=\"edge10\" class=\"edge\">\n",
       "<title>140060034298960&#45;&gt;140060165603728</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M429.1436,-297.2741C429.1436,-279.3665 429.1436,-251.7016 429.1436,-230.9091\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"432.6437,-230.7505 429.1436,-220.7505 425.6437,-230.7505 432.6437,-230.7505\"/>\n",
       "</g>\n",
       "<!-- 140060034298960&#45;&gt;140060034299472 -->\n",
       "<g id=\"edge11\" class=\"edge\">\n",
       "<title>140060034298960&#45;&gt;140060034299472</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M462.0174,-306.7243C504.2144,-295.614 580.9235,-275.417 655.6024,-255.7545\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"656.8664,-259.041 665.6456,-253.1101 655.084,-252.2717 656.8664,-259.041\"/>\n",
       "</g>\n",
       "<!-- 140060034299664&#45;&gt;140060034380240 -->\n",
       "<g id=\"edge13\" class=\"edge\">\n",
       "<title>140060034299664&#45;&gt;140060034380240</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M214.9064,-447.4904C188.6863,-436.4503 149.1689,-419.8114 118.3532,-406.8364\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"119.668,-403.5924 109.0934,-402.9375 116.9515,-410.0439 119.668,-403.5924\"/>\n",
       "</g>\n",
       "<!-- 140060034299664&#45;&gt;140060034381584 -->\n",
       "<g id=\"edge14\" class=\"edge\">\n",
       "<title>140060034299664&#45;&gt;140060034381584</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M243.1436,-441.2111C243.1436,-433.5107 243.1436,-424.3541 243.1436,-415.7964\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"246.6437,-415.793 243.1436,-405.793 239.6437,-415.793 246.6437,-415.793\"/>\n",
       "</g>\n",
       "<!-- 140060034299664&#45;&gt;140060034300688 -->\n",
       "<g id=\"edge15\" class=\"edge\">\n",
       "<title>140060034299664&#45;&gt;140060034300688</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M272.2061,-448.1297C300.5974,-437.1396 344.3973,-420.1847 378.5179,-406.9768\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"379.802,-410.2329 387.8642,-403.3589 377.275,-403.7049 379.802,-410.2329\"/>\n",
       "</g>\n",
       "<!-- 140060034299536&#45;&gt;140060034299984 -->\n",
       "<g id=\"edge17\" class=\"edge\">\n",
       "<title>140060034299536&#45;&gt;140060034299984</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M243.1436,-585.2111C243.1436,-577.5107 243.1436,-568.3541 243.1436,-559.7964\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"246.6437,-559.793 243.1436,-549.793 239.6437,-559.793 246.6437,-559.793\"/>\n",
       "</g>\n",
       "</g>\n",
       "</svg>\n"
      ],
      "text/plain": [
       "<graphviz.files.Source at 0x7f62452c4110>"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "ps.to_dot(ast, graph_style={'size': \"9.5,12.5\"})"
   ]
  }
 ],
 "metadata": {
  "anaconda-cloud": {},
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.7"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}