code: def _compute_grid(self):
          
          widths = []
          for c in range(self.cols):
              c_widths = []
              for r in range(self.rows):
                  subplot = self.subplots.get((r, c), None)
                  nsubplots = 1 if subplot is None else len(subplot.layout)
                  c_widths.append(2 if nsubplots > 1 else 1)
              widths.append(max(c_widths))
  
          heights = []
          for r in range(self.rows):
              r_heights = []
              for c in range(self.cols):
                  subplot = self.subplots.get((r, c), None)
                  nsubplots = 1 if subplot is None else len(subplot.layout)
                  r_heights.append(2 if nsubplots > 2 else 1)
              heights.append(max(r_heights))
  
          # Generate empty grid
          rows = sum(heights)
          cols = sum(widths)
          grid = [[None]*cols for _ in range(rows)]
  
          return grid
docs: Computes an empty grid to position the plots on by expanding
          any AdjointLayouts into multiple rows and columns.