<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _update_table_fallbacks(self, table_toplevels):
 """ Updates the fallbacks on all the table elements to make relative table access possible. Raises DuplicateKeysError if appropriate. """


        if len(self.elements) <= 1:
            return

        def parent_of(toplevel):
            # Returns an TopLevel parent of the given entry, or None.
            for parent_toplevel in table_toplevels:
                if toplevel.name.sub_names[:-1] == parent_toplevel.name.sub_names:
                    return parent_toplevel

        for entry in table_toplevels:
            if entry.name.is_qualified:
                parent = parent_of(entry)
                if parent:
                    child_name = entry.name.without_prefix(parent.name)
                    parent.table_element.set_fallback({child_name.sub_names[0]: entry.table_element})