def _get_table_context(self, query_bundle: QueryBundle) -> str:
        """
        Get table context.

        Get tables schema + optional context as a single string. Taken from
        SQLContextContainer.

        """
        if self._sql_context_container.context_str is not None:
            tables_desc_str = self._sql_context_container.context_str
        else:
            table_desc_list = []
            context_dict = self._sql_context_container.context_dict
            if context_dict is None:
                raise ValueError(
                    "context_dict must be provided. There is currently no "
                    "table context."
                )
            for table_desc in context_dict.values():
                table_desc_list.append(table_desc)
            tables_desc_str = "\n\n".join(table_desc_list)

        return tables_desc_str

        Get table context.

        Get tables schema + optional context as a single string. Taken from
        SQLContextContainer.

        
llama-index-core/llama_index/core/indices/struct_store/sql_query.py