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