bpo-38839: Fix some unused functions in tests (GH-17189)

diff --git a/Lib/test/test_code.py b/Lib/test/test_code.py
index 0d80af4..656c46c 100644
--- a/Lib/test/test_code.py
+++ b/Lib/test/test_code.py
@@ -241,7 +241,7 @@
         def func2():
             y = 2
             return y
-        code2 = func.__code__
+        code2 = func2.__code__
 
         for attr, value in (
             ("co_argcount", 0),