code: def save_pdf(self, file_name='graph.pdf', prog='dot'):
          
          self.graph.draw(file_name, prog=prog)
docs: Draw the graph and save as an image or pdf file.
  
          Parameters
          ----------
          file_name : Optional[str]
              The name of the file to save the graph as. Default: graph.pdf
          prog : Optional[str]
              The graphviz program to use for graph layout. Default: dot