def format_keyspace_to_markdown(
        self, keyspace: str, tables: Optional[List[Table]] = None
    ) -> str:
        """
        Generates a markdown representation of the schema for a specific keyspace
        by iterating over all tables within that keyspace and calling their
        as_markdown method.

        Parameters
        ----------
        - keyspace (str): The name of the keyspace to generate markdown
        documentation for.
        - tables (list[Table]): list of tables in the keyspace; it will be resolved
        if not provided.

        Returns
        -------
        A string containing the markdown representation of the specified
        keyspace schema.

        """
        if not tables:
            tables = self.get_keyspace_tables(keyspace)

        if tables:
            output = f"## Keyspace: {keyspace}\n\n"
            if tables:
                for table in tables:
                    output += table.as_markdown(include_keyspace=False, header_level=3)
                    output += "\n\n"
            else:
                output += "No tables present in keyspace\n\n"

            return output
        else:
            return ""

        Generates a markdown representation of the schema for a specific keyspace
        by iterating over all tables within that keyspace and calling their
        as_markdown method.

        Parameters
        ----------
        - keyspace (str): The name of the keyspace to generate markdown
        documentation for.
        - tables (list[Table]): list of tables in the keyspace; it will be resolved
        if not provided.

        Returns
        -------
        A string containing the markdown representation of the specified
        keyspace schema.

        
llama-index-integrations/tools/llama-index-tools-cassandra/llama_index/tools/cassandra/cassandra_database_wrapper.py