docs: def create_event(
      title,
      event_type,
      description='',
      start_time=None,
      end_time=None,
      note=None,
      **rrule_params
  ):
      '''
      Convenience function to create an ``Event``, optionally create an
      ``EventType``, and associated ``Occurrence``s. ``Occurrence`` creation
      rules match those for ``Event.add_occurrences``.
  
      Returns the newly created ``Event`` instance.
  
      Parameters
  
      ``event_type``
          can be either an ``EventType`` object or 2-tuple of ``(abbreviation,label)``,
          from which an ``EventType`` is either created or retrieved.
  
      ``start_time``
          will default to the current hour if ``None``
  
      ``end_time``
          will default to ``start_time`` plus swingtime_settings.DEFAULT_OCCURRENCE_DURATION
          hour if ``None``
  
      ``freq``, ``count``, ``rrule_params``
          follow the ``dateutils`` API (see http://labix.org/python-dateutil)
  
      '''
  
      if isinstance(event_type, tuple):
          event_type, created = EventType.objects.get_or_create(
              abbr=event_type[0],
              label=event_type[1]
          )
  
      event = Event.objects.create(
          title=title,
          description=description,
          event_type=event_type
      )
  
      if note is not None:
          event.notes.create(note=note)
  
      start_time = start_time or datetime.now().replace(
          minute=0,
          second=0,
          microsecond=0
      )
  
      end_time = end_time or (start_time + swingtime_settings.DEFAULT_OCCURRENCE_DURATION)
      event.add_occurrences(start_time, end_time, **rrule_params)
      return event