<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def docelement(self):
 """Returns the instance of the element whose body owns the docstring in the current operation. """

        #This is needed since the decorating documentation
        #for types and executables is in the body of the module, but when they
        #get edited, the edit belongs to the type/executable because the character
        #falls within the absstart and end attributes.
        if self._docelement is None:
            if isinstance(self.element, Module):
                self._docelement = self.element
            else:
                ichar = self.element.module.charindex(self.icached[0], 1)
                if (ichar > self.element.docstart and ichar <= self.element.docend):
                    self._docelement = self.element.parent
                else:
                    self._docelement = self.element

        return self._docelement