code: def _get_smallest_dimensions(self, data):
          
          min_width = 0
          min_height = 0
          for element in self.elements:
              if not element: continue
              size = element.get_minimum_size(data)
              min_width = max(min_width, size.x)
              min_height = max(min_height, size.y)
          return datatypes.Point(min_width, min_height)
docs: A utility method to return the minimum size needed to fit
          all the elements in.