code: def _setwinsize(fd, rows, cols):
      # Some very old platforms have a bug that causes the value for
      # termios.TIOCSWINSZ to be truncated. There was a hack here to work
      # around this, but it caused problems with newer platforms so has been
      # removed. For details see https://github.com/pexpect/pexpect/issues/39
      TIOCSWINSZ = getattr(termios, "TIOCSWINSZ", -2146929561)
      # Note, assume ws_xpixel and ws_ypixel are zero.
      s = struct.pack("HHHH", rows, cols, 0, 0)
      fcntl.ioctl(fd, TIOCSWINSZ, s)
  
imports: import codecs
  import errno
  import fcntl
  import io
  import os
  import pty
  import resource
  import signal
  import struct
  import sys
  import termios
  import time
  from pty import STDIN_FILENO, CHILD
  from .util import which, PtyProcessError
label_desc: Use image node_id 3 for calling a global function with example usage: _setwinsize(fd, rows, cols) without return types