docstr: Calculate the widths of each column, including padding, not
  including borders.
  
  Adjacent collapsed columns will be removed until there is only a single
  truncated column remaining.
docstr_tok: ["Calculate","the","widths","of","each","column",",","including","padding",",","not","including","borders",".","Adjacent","collapsed","columns","will","be","removed","until","there","is","only","a","single","truncated","column","remaining","."]
code: def _calculate_column_widths(
      self, console: "Console", options: "ConsoleOptions"
  ) -> List[int]:
      """Calculate the widths of each column, including padding, not
      including borders.
  
      Adjacent collapsed columns will be removed until there is only a single
      truncated column remaining.
      """
      widths = super()._calculate_column_widths(console, options)
      last_collapsed = -1
      columns = self.columns
      for i in range(len(columns) - 1, -1, -1):
          if widths[i] == 0 and columns[i].collapse:  # type: ignore[attr-defined]
              if last_collapsed >= 0:
                  del widths[last_collapsed]
                  del columns[last_collapsed]
                  if self.box:
                      options.max_width += 1
                  for column in columns[last_collapsed:]:
                      column._index -= 1
              last_collapsed = i
              padding = self._get_padding_width(i)
              if (
                  columns[i].overflow == "ellipsis"
                  and (sum(widths) + padding) <= options.max_width
              ):
                  # Set content width to 1 (plus padding) if we can fit a
                  # single unicode ellipsis in this column
                  widths[i] = 1 + padding
          else:
              last_collapsed = -1
      return widths
  
imports: from typing import TYPE_CHECKING, Any, List
  from rich.table import Table
label_desc: Use image node_id 2 for calling the Table obj's underlying member method code with example usage: obj._calculate_column_widths(console, options) and returns: widths