def get_window_size(self, cli):
        get_active_window = self.arrangement.get_active_window
        active_window = get_active_window(cli)

        # Get connections watching the same window.
        connections = [c for c in self.connections if
                       c.cli and get_active_window(c.cli) == active_window]

        rows = [c.size.rows for c in connections]
        columns = [c.size.columns for c in connections]

        if self._runs_standalone:
            r, c = _get_size(sys.stdout.fileno())
            rows.append(r)
            columns.append(c)

        if rows and columns:
            return Size(rows=min(rows) - (1 if self.enable_status else 0),
                        columns=min(columns))
        else:
            return Size(rows=20, columns=80)
Return trial counts by looking at self._trials
dataset/ETHPy150Open jonathanslenders/pymux/pymux/main.py/Pymux.get_window_size--crossover with--dataset/ETHPy150Open hyperopt/hyperopt/hyperopt/base.py/Trials.count_by_state_synced