code: def prior_sample(bn):
      
      event = {}
      for node in bn.nodes:
          event[node.variable] = node.sample(event)
      return event
docs: Randomly sample from bn's full joint distribution. The result
      is a {variable: value} dict. [Fig. 14.13]