def METHOD_NAME(self):
    # Modify the builtins module directly.
    def foo():
        return len([1, 2, 3])
    self.configure_func(foo)
    self.assertEqual(foo(), 3)
    with swap_attr(builtins, "len", lambda x: 7):
        self.assertEqual(foo(), 7)