code: def draw_model_to_file(
      sgraph,
      png_fname,
      display_param_nodes=False,
      rankdir="TB",
      styles=None,
  ):
      """Create a PNG file, containing a graphiz-dot graph of the netowrk represented
      by SummaryGraph 'sgraph'
      Args:
          sgraph (SummaryGraph): the SummaryGraph instance to draw.
          png_fname (string): PNG file name
          display_param_nodes (boolean): if True, draw the parameter nodes
          rankdir: diagram direction.  'TB'/'BT' is Top-to-Bottom/Bottom-to-Top
                   'LR'/'R/L' is Left-to-Rt/Rt-to-Left
          styles: a dictionary of styles.  Key is module name.  Value is
                  a legal pydot style dictionary.  For example:
                  styles['conv1'] = {'shape': 'oval',
                                     'fillcolor': 'gray',
                                     'style': 'rounded, filled'}
      """
      png = sgraph2dot(
          sgraph,
          display_param_nodes=display_param_nodes,
          rankdir=rankdir,
          styles=styles,
      ).create_png()
      with open(png_fname, "wb") as fid:
          fid.write(png)
  
file_path: tensorwatch/tensorwatch/model_graph/hiddenlayer/pytorch_draw_model.py
imports: import pydot
  from .summary_graph import SummaryGraph
  from .None import distiller
  import torch
  import collections.abc
  import os
label_desc: Use image node_id 3 for calling a global function with example usage: draw_model_to_file(sgraph, png_fname, display_param_nodes, rankdir, styles) without return types