<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def render(self, rect, data):
 """Draws the columns."""

        num_elements = len(self.elements)
        col_width = (rect.w-self.margin*(num_elements-1)) / float(num_elements)
        x = rect.x
        for element in self.elements:
            if element is not None:
                element.render(datatypes.Rectangle(
                        x, rect.y, col_width, rect.h
                        ), data)
            x += col_width + self.margin