<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def createCommit(self, varBind, **context):
 """Create Managed Object Instance. Implements the second of the multi-step workflow similar to the SNMP SET command processing (:RFC:`1905#section-4.2.5`). The goal of the second phase is to actually create requested Managed Object Instance. When multiple Managed Objects Instances are created/modified at once (likely coming all in one SNMP PDU), each of them has to run through the second (*commit*) phase successfully for the system to transition to the third (*cleanup*) phase. If any single *commit* step fails, the system transitions into the *undo* state for each of Managed Objects Instances being processed at once. The role of this object in the MIB tree is non-terminal. It does not access the actual Managed Object Instance, but just traverses one level down the MIB tree and hands off the query to the underlying objects. Parameters varBind: :py:class:`~pysnmp.smi.rfc1902.ObjectType` object representing new Managed Object Instance value to create Other Parameters \*\*context: Query parameters: * `cbFun` (callable) - user-supplied callable that is invoked to pass the new value of the Managed Object Instance or an error. * `instances` (dict):
 user-supplied dict for temporarily holding Managed Objects Instances being created. Notes ----- The callback functions (e.g. `cbFun`) have the same signature as this method where `varBind` contains the new Managed Object Instance value. In case of an error, the `error` key in the `context` dict will contain an exception object. """

        name, val = varBind

        (debug.logger & debug.FLAG_INS and
         debug.logger('%s: writeCommit(%s, %r)' % (self, name, val)))

        cbFun = context['cbFun']

        instances = context['instances'].setdefault(self.name, {self.ST_CREATE: {}, self.ST_DESTROY: {}})
        idx = context['idx']

        if name in self._vars:
            cbFun(varBind, **context)
            return

        # NOTE: multiple names are possible in a single PDU, that could collide
        # Therefore let's keep old object indexed by (negative) var-bind index
        self._vars[name], instances[self.ST_CREATE][-idx - 1] = instances[self.ST_CREATE][idx], self._vars.get(name)

        instances[self.ST_CREATE][idx].writeCommit(varBind, **context)