code: def create_layout_params(self, child, layout):
          
          dp = self.dp
          w, h = (coerce_size(layout.get('width', 'wrap_content')),
                  coerce_size(layout.get('height', 'wrap_content')))
          w = w if w < 0 else int(w * dp)
          h = h if h < 0 else int(h * dp)
          layout_params = self.layout_param_type(w, h)
  
          if layout.get('margin'):
              l, t, r, b = layout['margin']
              layout_params.setMargins(int(l*dp), int(t*dp),
                                       int(r*dp), int(b*dp))
          return layout_params
docs: Create the LayoutParams for a child with it's requested
          layout parameters. Subclasses should override this as needed
          to handle layout specific needs.
          
          Parameters
          ----------
          child: AndroidView
              A view to create layout params for.
          layout: Dict
              A dict of layout parameters to use to create the layout.
               
          Returns
          -------
          layout_params: LayoutParams
              A LayoutParams bridge object with the requested layout options.