<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def overwrite_docs(self, doc):
 """Adds the specified DocElement to the docstring list. However, if an element with the same xml tag and pointsto value already exists, it will be overwritten."""

        for i in range(len(self.docstring)):
            if (self.docstring[i].doctype == doc.doctype and
                self.docstring[i].pointsto == doc.pointsto):
                del self.docstring[i]
                break

        self.docstring.append(doc)