code: def structure(table_toplevels):
      
  
      table_toplevels = tuple(table_toplevels)
      obj = NamedDict()
  
      last_array_of_tables = None         # The Name of the last array-of-tables header
  
      for toplevel in table_toplevels:
  
          if isinstance(toplevel, toplevels.AnonymousTable):
              obj[''] = toplevel.table_element
  
          elif isinstance(toplevel, toplevels.Table):
              if last_array_of_tables and toplevel.name.is_prefixed_with(last_array_of_tables):
                  seq = obj[last_array_of_tables]
                  unprefixed_name = toplevel.name.without_prefix(last_array_of_tables)
  
                  seq[-1] = CascadeDict(seq[-1], NamedDict({unprefixed_name: toplevel.table_element}))
              else:
                  obj[toplevel.name] = toplevel.table_element
          else:    # It's an ArrayOfTables
  
              if last_array_of_tables and toplevel.name != last_array_of_tables and \
                      toplevel.name.is_prefixed_with(last_array_of_tables):
  
                  seq = obj[last_array_of_tables]
                  unprefixed_name = toplevel.name.without_prefix(last_array_of_tables)
  
                  if unprefixed_name in seq[-1]:
                      seq[-1][unprefixed_name].append(toplevel.table_element)
                  else:
                      cascaded_with = NamedDict({unprefixed_name: [toplevel.table_element]})
                      seq[-1] = CascadeDict(seq[-1], cascaded_with)
  
              else:
                  obj.append(toplevel.name, toplevel.table_element)
                  last_array_of_tables = toplevel.name
  
      return obj
docs: Accepts an ordered sequence of TopLevel instances and returns a navigable object structure representation of the
      TOML file.