code: def _finish_operation_action(self, action):
          
  
          success = action.data['success']
          conn_key = action.data['id']
  
          if self._get_connection_state(conn_key) != self.InProgress:
              self._logger.error("Invalid finish_operation action on a connection whose state is not InProgress, conn_key=%s", str(conn_key))
              return
  
          # Cannot be None since we checked above to make sure it exists
          data = self._get_connection(conn_key)
          callback = data['callback']
          conn_id = data['conn_id']
          args = action.data['callback_args']
  
          data['state'] = self.Idle
          data['microstate'] = None
  
          callback(conn_id, self.id, success, *args)
docs: Finish an attempted operation.
  
          Args:
              action (ConnectionAction): the action object describing the result
                  of the operation that we are finishing