code: def match_widths(boxes, width_ratios=None, strength="medium"):
      """
      Stack LayoutBox instances from top to bottom
      """
  
      if width_ratios is None:
          width_ratios = np.ones(len(boxes))
      for i in range(1, len(boxes)):
          c = (
              boxes[i - 1].width
              == boxes[i].width * width_ratios[i - 1] / width_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 7 for calling a global function with example usage: match_widths(boxes, width_ratios, strength) without return types