<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def terminal_size(self):
 """Gets the terminal columns size."""

        try:
            _, columns = os.popen('stty size', 'r').read().split()
            return min(int(columns) - 10, 100)
        except ValueError:
            return self.default_terminal_size