<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def vm_result_update(self, payload):
 """Update the result field in VM database. This request comes from an agent that needs to update the result in VM database to success or failure to reflect the operation's result in the agent. """


        port_id = payload.get('port_id')
        result = payload.get('result')

        if port_id and result:
            # Update the VM's result field.
            params = dict(columns=dict(result=result))
            self.update_vm_db(port_id, **params)