class_docstr: A base class of GridSpec that specifies the geometry of the grid
  that a subplot will be placed.
class_docstr_tok: ["A","base","class","of","GridSpec","that","specifies","the","geometry","of","the","grid","that","a","subplot","will","be","placed","."]
code: def set_height_ratios(self, height_ratios):
      if (
          height_ratios is not None
          and len(height_ratios) != self._nrows
      ):
          raise ValueError(
              "Expected the given number of height ratios to "
              "match the number of rows of the grid"
          )
      self._row_height_ratios = height_ratios
  
imports: from __future__ import absolute_import, division, print_function
  import six
  import copy
  import logging
  import warnings
  import numpy
  import matplotlib
  from matplotlib import _pylab_helpers, tight_layout, rcParams
  from matplotlib.transforms import Bbox
  import matplotlib._layoutbox
  from matplotlib.cbook import mplDeprecation
label_desc: Use image node_id 7 for calling the GridSpecBase obj's underlying member method code with example usage: obj.set_height_ratios(height_ratios) without return types