code: def save(self, cf, filename, format='dot'):
          
          try:
              dot_graph = Dot(**self.graph_format)
  
              # add nodes
              nodes = {}
              for cfg_addr in cf._graph.node.keys():
                  nodes[cfg_addr] = self._create_node(cfg_addr, cf)
  
                  dot_graph.add_node(nodes[cfg_addr])
  
              # add edges
              for cfg_src_addr in cf._graph.node.keys():
                  for cfg_dst_addr in cf._edges.get(cfg_src_addr, []):
                      edge = self._create_edge(nodes, cfg_src_addr, cfg_dst_addr)
  
                      dot_graph.add_edge(edge)
  
              dot_graph.write("{}.{}".format(filename, format), format=format)
          except Exception:
              logger.error("Failed to save call graph: %s (%s)", filename, format, exc_info=True)
docs: Save basic block graph into a file.