def collapse_current(var, pos, iinfo):
    if iinfo.show_detail:
        iinfo.show_detail = False
    elif (var.parent is not None):
        p_iinfo = get_inspect_info(var.parent.id_path)
        p_iinfo.show_detail = False
        return self.locals.index(var.parent)
    return None
def collapse_current(var, pos, iinfo):
    if iinfo.show_detail:
        iinfo.show_detail = False
    elif (var.parent is not None):
        p_iinfo = get_inspect_info(var.parent.id_path)
        p_iinfo.show_detail = False
        return self.locals.index(var.parent)
    return None