def find_one(self, spec_or_id, **kwargs):
if spec_or_id is not None and not isinstance(spec_or_id, dict):<EOL><INDENT>spec_or_id = {"<STR_LIT>": spec_or_id}<EOL><DEDENT>kwargs['<STR_LIT>'] = -<NUM_LIT:1><EOL>self.find(spec_or_id, **kwargs)<EOL>
Get a single document from the database.

        All arguments to :meth:`find` are also valid arguments for
        :meth:`find_one`, although any `limit` argument will be
        ignored. Returns a single document, or ``None`` if no matching
        document is found.