<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def warn(self, collection):
 """Checks this code element for documentation related problems."""

        if not self.has_docstring():
            collection.append("WARNING: no docstring on code element {}".format(self.name))