code: def get_calendar_for_object(self, obj, distinction=''):
          
          calendar_list = self.get_calendars_for_object(obj, distinction)
          if len(calendar_list) == 0:
              raise Calendar.DoesNotExist("Calendar does not exist.")
          elif len(calendar_list) > 1:
              raise AssertionError("More than one calendars were found.")
          else:
              return calendar_list[0]
docs: This function gets a calendar for an object.  It should only return one
          calendar.  If the object has more than one calendar related to it (or
          more than one related to it under a distinction if a distinction is
          defined) an AssertionError will be raised.  If none are returned it will
          raise a DoesNotExistError.
  
          >>> user = User.objects.get(username='tony')
          >>> try:
          ...     Calendar.objects.get_calendar_for_object(user)
          ... except Calendar.DoesNotExist:
          ...     print("failed")
          ...
          failed
  
          Now if we add a calendar it should return the calendar
  
          >>> calendar = Calendar(name='My Cal')
          >>> calendar.save()
          >>> calendar.create_relation(user)
          >>> Calendar.objects.get_calendar_for_object(user)
          <Calendar: My Cal>
  
          Now if we add one more calendar it should raise an AssertionError
          because there is more than one related to it.
  
          If you would like to get more than one calendar for an object you should
          use get_calendars_for_object (see below).
          >>> calendar = Calendar(name='My 2nd Cal')
          >>> calendar.save()
          >>> calendar.create_relation(user)
          >>> try:
          ...     Calendar.objects.get_calendar_for_object(user)
          ... except AssertionError:
          ...     print("failed")
          ...
          failed