code: def tag_array(events):
      
      all_tags = sorted(set(tag for event in events for tag in event.tags))
      array = np.zeros((len(events), len(all_tags)))
      for row, event in enumerate(events):
          for tag in event.tags:
              array[row, all_tags.index(tag)] = 1
      return array
docs: Return a numpy array mapping events to tags
  
      - Rows corresponds to events
      - Columns correspond to tags