code: def setUpClass(cls):
      cls.addClassCleanup(
          setattr, run, "print_exception", run.print_exception
      )
      cls.prt = Func()  # Need reference.
      run.print_exception = cls.prt
      mockrpc = mock.Mock()
      mockrpc.console.getvar = Func(result=False)
      cls.ex = run.Executive(mockrpc)
  
imports: from idlelib import run
  import io
  import sys
  from test.support import captured_output, captured_stderr
  import unittest
  from unittest import mock
  import idlelib
  from idlelib.idle_test.mock_idle import Func
label_desc: Use image node_id 1 for calling the ExecRuncodeTest obj's underlying member method code with example usage: obj.setUpClass(cls) without return types