def _make_logpt(global_RVs, local_RVs, observed_RVs, potentials):
 factors = ((([(c * v.logpt) for (v, c) in observed_RVs.items()] + [(c * v.logpt) for (v, c) in global_RVs.items()]) + [(c * v.logpt) for (v, (_, c)) in local_RVs.items()]) + potentials)
 logpt = tt.add(*map(tt.sum, factors))
 return logpt

def _make_logpt ( global_RVs , local_RVs , observed_RVs , potentials ) : factors = ( ( ( [ ( c * v . logpt ) for ( v , c ) in observed_RVs . items ( ) ] + [ ( c * v . logpt ) for ( v , c ) in global_RVs . items ( ) ] ) + [ ( c * v . logpt ) for ( v , ( _ , c ) ) in local_RVs . items ( ) ] ) + potentials ) logpt = tt . add ( * map ( tt . sum , factors ) ) return logpt
return expression of log probability .