using pyeda library.
A binary decision diagram is a rooted, directed, acyclic graph.
Nonterminal nodes in such a graph are called decision nodes and these nodes are represented by a boolean variable and has two child nodes.
BDDs are a Shannon expansion used for data compression. For further reading on Shannon-Fano Algorithm https://www.geeksforgeeks.org/shannon-fano-algorithm-for-data-compression/