code: def setUp(self):
      old_sighup = signal.signal(signal.SIGHUP, self.handle_sighup)
      self.addCleanup(signal.signal, signal.SIGHUP, old_sighup)
  
      # Save original stdin window size.
      self.stdin_dim = None
      if _HAVE_WINSZ:
          try:
              self.stdin_dim = tty.tcgetwinsize(pty.STDIN_FILENO)
              self.addCleanup(
                  tty.tcsetwinsize, pty.STDIN_FILENO, self.stdin_dim
              )
          except tty.error:
              pass
  
imports: from test.support import verbose, reap_children
  from test.support.import_helper import import_module
  import errno
  import os
  import pty
  import tty
  import sys
  import select
  import signal
  import socket
  import io
  import unittest
  import warnings
label_desc: Use image node_id 1 for calling the PtyTest obj's underlying member method code with example usage: obj.setUp() without return types