code: def replace_one(cls, filter, replacement, upsert=False):
          
          return cls.collection.replace_one(
              filter, replacement, upsert
          ).raw_result
docs: Replaces a document that passes the filter.
          Will upsert a new document if upsert=True and no document is filtered