def METHOD_NAME(self):
    with pytest.raises(TypeError):
        self.kls(true, finalize=True).add_restriction(false)
    with pytest.raises(TypeError):
        self.kls(node_type="foon").add_restriction(false)
    k = self.kls(finalize=False)
    k.add_restriction(false)
    assert k.restrictions == [false]