@classmethod
def find_one(cls, query=None, doc_id=None):
    """Return a single object matching the query"""
    if doc_id is not None:
        result = cls.find(query, doc_ids=[doc_id])
    else:
        result = cls.find(query)
    try:
        return next(iter(result))
    except StopIteration:
        return None
