'create required structure and the serialise'

def _write(self):

    anchors = []
    for (idx, obj) in enumerate((self.charts + self.images), 1):
        if isinstance(obj, ChartBase):
            rel = Relationship(type='chart', target=('../charts/chart%s.xml' % obj._id))
            (row, col) = coordinate_to_tuple(obj.anchor)
            anchor = OneCellAnchor()
            anchor._from.row = (row - 1)
            anchor._from.col = (col - 1)
            anchor.ext.width = cm_to_EMU(obj.width)
            anchor.ext.height = cm_to_EMU(obj.height)
            anchor.graphicFrame = self._chart_frame(idx)
        elif isinstance(obj, Image):
            rel = Relationship(type='image', target=('../media/image%s.png' % obj._id))
            anchor = obj.drawing.anchor
            anchor.pic = self._picture_frame(idx)
        anchors.append(anchor)
        self._rels.append(rel)
    self.oneCellAnchor = anchors
    tree = self.to_tree()
    tree.set('xmlns', SHEET_DRAWING_NS)
    return tree
