def METHOD_NAME(self):
    dct = dict(a=dict(a1=1, a2=2), b=dict(b1=dict(b11=11, b12=dict(b121=121))))
    with self.assertRaises(KeyError):
        set_nested_value(dct, 400, ("b", "b1", "b12", "b122"))