Refactor sampling function for uncertainty analysis.
Add tests for NOR and NAND gates as children.