<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def all_to_annot(self, annot, names=['TPd', 'TPs', 'FP', 'FN']):
 """Convenience function to write all events to XML by category, showing overlapping TP detection and TP standard."""

        self.to_annot(annot, 'tp_det', names[0])
        self.to_annot(annot, 'tp_std', names[1])
        self.to_annot(annot, 'fp', names[2])
        self.to_annot(annot, 'fn', names[3])