code: def to_annot(self, annot, name=None, chan=None):
          
          annot.add_events(self.events, name=name, chan=chan)
docs: Write events to Annotations file.
          
          Parameters
          ----------
          annot : instance of Annotations
              Annotations file
          name : str
              name for the event type