code: def set_size(self, width, height):
          
          if width is not None:
              try:
                  width = to_pix(int(width))
              except ValueError:
                  # now we know w has 'px or % in it'
                  pass
              self.style['width'] = width
  
          if height is not None:
              try:
                  height = to_pix(int(height))
              except ValueError:
                  # now we know w has 'px or % in it'
                  pass
              self.style['height'] = height
docs: Set the widget size.
  
          Args:
              width (int or str): An optional width for the widget (es. width=10 or width='10px' or width='10%').
              height (int or str): An optional height for the widget (es. height=10 or height='10px' or height='10%').