docs: def update_entry(database, entry, report_type):
      """Update a record of a contribution report in the provided database.
  
      @param db: The MongoDB database to operate on. The contributions collection
          will be used from this database.
      @type db: pymongo.database.Database
      @param entry: The entry to insert into the database, updating the entry with
          the same recordID if one exists.
      @type entry: dict
      @param report_type: The type of report being updated. Should be one of the
          strings in constants.REPORT_TYPES.
      @type report_type: str
      @raise ValueError: Raised if the requested report type could not be found.
      """
      factory = UpdateStrategyFactory.get_instance()
      strategy = factory.get_strategy(report_type)
      if not strategy:
          raise ValueError('%s not a recognized report type.' % report_type)
  
      return strategy(database, entry, reassign_id=reassign_id,
          force_copy=force_copy)