'Retrieve the the matching object raising
:class:`~mongoengine.queryset.MultipleObjectsReturned` or
`DocumentName.MultipleObjectsReturned` exception if multiple results
and :class:`~mongoengine.queryset.DoesNotExist` or
`DocumentName.DoesNotExist` if no results are found.
.. versionadded:: 0.3'

def get(self, *q_objs, **query):

    queryset = self.clone()
    queryset = queryset.order_by().limit(2)
    queryset = queryset.filter(*q_objs, **query)
    try:
        result = queryset.next()
    except StopIteration:
        msg = ('%s    matching    query    does    not    exist.' % queryset._document._class_name)
        raise queryset._document.DoesNotExist(msg)
    try:
        queryset.next()
    except StopIteration:
        return result
    queryset.rewind()
    message = (u'%d    items    returned,    instead    of    1' % queryset.count())
    raise queryset._document.MultipleObjectsReturned(message)
