def one(self, *args, **kwargs):
        """
        `one()` act like `find()` but will raise a
        `mongokit.MultipleResultsFound` exception if there is more than one
        result.

        If no document is found, `one()` returns `None`
        """
        bson_obj = self.find(*args, **kwargs)
        count = bson_obj.count()
        if count > 1:
            raise MultipleResultsFound("%s results found" % count)
        elif count == 1:
            try:
                doc = bson_obj.next()
            except __HOLE__:
                doc = None
            return doc
dataset/ETHPy150Open namlook/mongokit/mongokit/document.py/Document.one