def METHOD_NAME(self):
    def foo():
        return len([1, 2, 3])
    self.configure_func(foo)
    # Note that this *doesn't* change the definition of len() seen by foo().
    builtins_dict = {"len": lambda x: 7}
    globals_dict = {"foo": foo, "__builtins__": builtins_dict,
                    "len": lambda x: 8}
    self.assertEqual(eval("foo()", globals_dict), 3)
    self.assertEqual(eval("foo()", {"foo": foo}), 3)