code: def cfg_to_dot(self, filename):
          
          with open(filename, 'w', encoding='utf8') as f:
              f.write('digraph{\n')
              for node in self.nodes:
                  f.write('{}[label="{}"];\n'.format(node.node_id, str(node)))
                  for son in node.sons:
                      f.write('{}->{};\n'.format(node.node_id, son.node_id))
  
              f.write("}\n")
docs: Export the function to a dot file
          Args:
              filename (str)