<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def update(self, instance, condition):
 """Update the instance to the database :param instance: an instance of modeled data object :param condition: condition evaluated to determine record(s) to update :returns: record id updated or None :rtype: int """

        item = self.dbi.get(condition)
        if item is None:
            return None
        item.update(instance.as_dict())
        self.dbi.update(item, condition)
        return item.eid