func NewFile(graph interface{}) (*ast.File, error) {
	g, ok := graph.(*ast.Graph)
	if !ok {
		return nil, fmt.Errorf("invalid graph type; expected *ast.Graph, got %T", graph)
	}
	return &ast.File{Graphs: []*ast.Graph{g}}, nil
}
=== [ File ] ================================================================
NewFile returns a new file based on the given graph.
package astx
import (
	"fmt"
	"strings"
	"gonum.org/v1/gonum/graph/formats/dot/ast"
	"gonum.org/v1/gonum/graph/formats/dot/internal/token"
)