code: def _get_terminal_size_linux():
      def ioctl_GWINSZ(fd):
          try:
              import fcntl
              import termios
              import struct
  
              cr = struct.unpack(
                  "hh", fcntl.ioctl(fd, termios.TIOCGWINSZ, "1234")
              )
          except (struct.error, IOError):
              return None
          return cr
  
      cr = ioctl_GWINSZ(0) or ioctl_GWINSZ(1) or ioctl_GWINSZ(2)
      if not cr:
          try:
              fd = os.open(os.ctermid(), os.O_RDONLY)
              cr = ioctl_GWINSZ(fd)
              os.close(fd)
          except OSError:
              pass
      if not cr or cr == (0, 0):
          try:
              from os import environ as env
  
              cr = (env["LINES"], env["COLUMNS"])
          except (ValueError, KeyError):
              return None
      return int(cr[1]), int(cr[0])
  
file_path: catboost/contrib/python/pandas/py2/pandas/io/formats/terminal.py
imports: from __future__ import print_function
  import os
  import shutil
  import subprocess
  from pandas.compat import PY3
label_desc: Use image node_id 5 for calling a global function with example usage: _get_terminal_size_linux() and returns: int,  int, cr, None, None