code: def save(self, filename, format="png"):
      # self.dot.format = format
      # directory, file_name = os.path.split(path)
      # # Remove extension from file name. dot.render() adds it.
      # file_name = file_name.replace("." + format, "")
      # self.dot.render(file_name, directory=directory, cleanup=True)
      if filename is not None:
          png = self.dot.create_png()
          with open(os.path.expanduser(filename), "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 the DotWrapper obj's underlying member method code with example usage: obj.save(filename, format) without return types