def translate_ui_stack_index(self, index):
    if (CONFIG['current_stack_frame'] == 'top'):
        return ((len(self.debugger.stack) - 1) - index)
    elif (CONFIG['current_stack_frame'] == 'bottom'):
        return index
    else:
        raise ValueError("invalid value for 'current_stack_frame' pref")
def translate_ui_stack_index(self, index):
    if (CONFIG['current_stack_frame'] == 'top'):
        return ((len(self.debugger.stack) - 1) - index)
    elif (CONFIG['current_stack_frame'] == 'bottom'):
        return index
    else:
        raise ValueError("invalid value for 'current_stack_frame' pref")