class_docstr: Analogous to a gridspec, and contained in another LayoutGrid.
class_docstr_tok: ["Analogous","to","a","gridspec",",","and","contained","in","another","LayoutGrid","."]
code: def add_constraints(self, parent):
      # define self-consistent constraints
      self.hard_constraints()
      # define relationship with parent layoutgrid:
      self.parent_constraints(parent)
      # define relative widths of the grid cells to each other
      # and stack horizontally and vertically.
      self.grid_constraints()
  
imports: import itertools
  import kiwisolver
  import logging
  import numpy
  import matplotlib
  import matplotlib.patches
  from matplotlib.transforms import Bbox
label_desc: Use image node_id 4 for calling the LayoutGrid obj's underlying member method code with example usage: obj.add_constraints(parent) without return types