code: def GetTermSize():
      """Gets the terminal x and y dimensions in characters.
  
      _GetTermSize*() helper functions taken from:
        http://stackoverflow.com/questions/263890/
  
      Returns:
        (columns, lines): A tuple containing the terminal x and y dimensions.
      """
      xy = None
      # Believe the first helper that doesn't bail.
      for get_terminal_size in (
          _GetTermSizePosix,
          _GetTermSizeWindows,
          _GetTermSizeEnvironment,
          _GetTermSizeTput,
      ):
          try:
              xy = get_terminal_size()
              if xy:
                  break
          except:  # pylint: disable=bare-except
              pass
      return xy or (80, 24)
  
file_path: python-fire/fire/console/console_attr_os.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import unicode_literals
  import os
  import sys
  from fire.console import encoding
label_desc: Use image node_id 1 for calling a global function with example usage: GetTermSize() and returns: unknown