function createGroups(events) {
  const groups = []
  const eventGroupMap = {}

  events.forEach(event => {
    let group = eventGroupMap[event.id]
    if (!group) {
      group = eventGroupMap[event.id]
      group = [event]
      groups.push(group)
    }

    events.forEach(_event => {
      if (_event === event) return
      if (collide(event, _event)) {
        if (!eventGroupMap[_event.id]) {
          eventGroupMap[_event.id] = group
          group.push(_event)
        }
      }
    })
  })

  return groups
}
Create groups of events which do not overlap. Events within this groups
will be rendered in columns if they overlap.

@param {Array} events
@return {Array}