class_docstr: Layout some DataFrames in vertical/horizontal layout for explanation.
  Used in merging.rst
docstr: Calculate appropriate figure size based on left and right data.
docstr_tok: ["Calculate","appropriate","figure","size","based","on","left","and","right","data","."]
code: def _get_cells(self, left, right, vertical):
      """
      Calculate appropriate figure size based on left and right data.
      """
  
      if vertical:
          # calculate required number of cells
          vcells = max(
              sum(self._shape(l)[0] for l in left),
              self._shape(right)[0],
          )
          hcells = (
              max(self._shape(l)[1] for l in left)
              + self._shape(right)[1]
          )
      else:
          vcells = max(
              [self._shape(l)[0] for l in left]
              + [self._shape(right)[0]]
          )
          hcells = sum(
              [self._shape(l)[1] for l in left]
              + [self._shape(right)[1]]
          )
      return hcells, vcells
  
file_path: catboost/contrib/python/pandas/py2/pandas/util/_doctools.py
imports: import numpy
  import pandas.compat
  import pandas
label_desc: Use image node_id 3 for calling the TablePlotter obj's underlying member method code with example usage: obj._get_cells(left, right, vertical) and returns: hcells,  vcells