<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def set(self, i, value):
 """Set value at position i and return a Future. :rtype: tornado.concurrent.Future """

        value_encoded = encode(value, self.get_change_trigger(i))

        if i in self.data and self.data[i] == value_encoded:
            return self

        self.data[i] = value_encoded
        return self.trigger_changed(i)