code: def render(self, doc):
          
          d = defer.succeed(doc)
          for element in self._elements:
              d.addCallback(element.render)
          return d
docs: Render all elements using specified document.
          @param doc: the writable document to render to.
          @type doc: document.IWritableDocument
          @return: a deferred fired with the specified document
                   when the rendering is done.
          @rtype: defer.Deferred