def get_terminal_size():
        # type: () -> Tuple[int, int]
        """
        Returns a tuple (x, y) representing the width(x) and the height(y)
        in characters of the terminal window.
        """
        return tuple(shutil.get_terminal_size())  # type: ignore

        Returns a tuple (x, y) representing the width(x) and the height(y)
        in characters of the terminal window.
        
product/gradle-plugin/src/main/python/pip/_internal/utils/compat.py