def eval(self, code, *args):
        if not isinstance(code, Code):
            code = Code(code)

        result = self.command("$eval", code, args=args)
        return result.get("retval", None)
Evaluate a JavaScript expression in MongoDB.
dataset/ETHPy150Open mongodb/mongo-python-driver/pymongo/database.py/Database.eval