human
Complete the below
def _get_terminal_size_linux():

    ''''Get terminal size Linux.'
    '''
assistant
#Here is the Python code you requested.
    def ioctl_GWINSZ(fd):
        '    ioctl_GWINSZ.    '
        try:
            import fcntl
            import termios
            cr = struct.unpack('hh', fcntl.ioctl(fd, termios.TIOCGWINSZ, '1234'))
            return cr
        except:
            pass
    cr = (ioctl_GWINSZ(0) or ioctl_GWINSZ(1) or ioctl_GWINSZ(2))
    if ((not cr) or (cr == (0, 0))):
        try:
            fd = os.open(os.ctermid(), os.O_RDONLY)
            cr = ioctl_GWINSZ(fd)
            os.close(fd)
        except:
            pass
    if ((not cr) or (cr == (0, 0))):
        try:
            cr = (os.environ['LINES'], os.environ['COLUMNS'])
        except:
            return
    return (int(cr[1]), int(cr[0]))