def METHOD_NAME(self):
    # Modify globals() to shadow an entry in builtins.
    def foo():
        return len([1, 2, 3])
    self.configure_func(foo)
    self.assertEqual(foo(), 3)
    with swap_item(globals(), "len", lambda x: 7):
        self.assertEqual(foo(), 7)