'Get the output size (number of lines and character width) for Column and
Table pformat/pprint methods.
If no value of ``max_lines`` is supplied then the height of the
screen terminal is used to set ``max_lines``.  If the terminal
height cannot be determined then the default will be determined
using the ``astropy.table.conf.max_lines`` configuration item. If a
negative value of ``max_lines`` is supplied then there is no line
limit applied.
The same applies for max_width except the configuration item is
``astropy.table.conf.max_width``.
Parameters
max_lines : int or None
Maximum lines of output (header + data rows)
max_width : int or None
Maximum width (characters) output
Returns
max_lines, max_width : int'

@staticmethod
def _get_pprint_size(max_lines=None, max_width=None):

    if (max_lines is None):
        max_lines = conf.max_lines
    if (max_width is None):
        max_width = conf.max_width
    if ((max_lines is None) or (max_width is None)):
        (lines, width) = terminal_size()
    if (max_lines is None):
        max_lines = lines
    elif (max_lines < 0):
        max_lines = sys.maxsize
    if (max_lines < 8):
        max_lines = 8
    if (max_width is None):
        max_width = width
    elif (max_width < 0):
        max_width = sys.maxsize
    if (max_width < 10):
        max_width = 10
    return (max_lines, max_width)
