code: def match_heights(boxes, height_ratios=None, strength="medium"):
      """
      Stack LayoutBox instances from top to bottom
      """
  
      if height_ratios is None:
          height_ratios = np.ones(len(boxes))
      for i in range(1, len(boxes)):
          c = (
              boxes[i - 1].height
              == boxes[i].height
              * height_ratios[i - 1]
              / height_ratios[i]
          )
          boxes[i].solver.addConstraint(c | strength)
  
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import itertools
  import kiwisolver
  import logging
  import numpy
  import warnings
  import matplotlib
label_desc: Use image node_id 6 for calling a global function with example usage: match_heights(boxes, height_ratios, strength) without return types