def METHOD_NAME(self):
    table_list = []
    env = self
    while 1:
        table_list.insert(0, env.table)
        try:
            env = env.parent
        except AttributeError:
            break
    merged_table = {}
    for table in table_list:
        merged_table.update(table)
    return merged_table