'Delete the specified callback.
Args:
obj (Object): the typeclassed object containing the callback.
callback_name (str): the name of the callback to delete.
number (int): the number of the callback to delete.
Raises:
RuntimeError if the callback is locked.'

def del_callback(self, obj, callback_name, number):

    obj_callbacks = self.db.callbacks.get(obj, {})
    callbacks = obj_callbacks.get(callback_name, [])
    if ((obj, callback_name, number) in self.db.locked):
        raise RuntimeError('this    callback    is    locked.')
    try:
        code = callbacks[number]['code']
    except IndexError:
        return
    else:
        logger.log_info('Deleting    callback    {}    {}    of    {}:\n{}'.format(callback_name, number, obj, code))
        del callbacks[number]
    i = 0
    while (i < len(self.db.to_valid)):
        (t_obj, t_callback_name, t_number) = self.db.to_valid[i]
        if ((obj is t_obj) and (callback_name == t_callback_name)):
            if (t_number == number):
                del self.db.to_valid[i]
                i -= 1
            elif (t_number > number):
                self.db.to_valid.insert(i, (t_obj, t_callback_name, (t_number - 1)))
                del self.db.to_valid[(i + 1)]
        i += 1
    for (i, line) in enumerate(self.db.locked):
        (t_obj, t_callback_name, t_number) = line
        if ((obj is t_obj) and (callback_name == t_callback_name)):
            if (number < t_number):
                self.db.locked[i] = (t_obj, t_callback_name, (t_number - 1))
    for script in list(obj.scripts.all()):
        if isinstance(script, TimecallbackScript):
            if ((script.obj is obj) and (script.db.callback_name == callback_name)):
                if (script.db.number == number):
                    script.stop()
                elif (script.db.number > number):
                    script.db.number -= 1
