Generate a random Bayesian network using package bnlearn. The nodes specify the partial ordering
of the graph, and the conditional probabilities are sampled from given distribution. The network is
generated to have on average given number of neighbours (i.e. both in-going and out-going edges)