code: def __end_of_list(self, ast_token):
          
          self.list_level -= 1
          if self.list_level == 0:
              if self.list_entry is not None:
                  self.final_ast_tokens.append(self.list_entry)
                  self.list_entry = None
              self.final_ast_tokens.append(ast_token)
docs: Handle end of a list.