def as_markdown(
        self, include_keyspace: bool = True, header_level: Optional[int] = None
    ) -> str:
        """
        Generates a Markdown representation of the Cassandra table schema, allowing for
        customizable header levels for the table name section.

        Parameters
        ----------
        - include_keyspace (bool): If True, includes the keyspace in the output.
          Defaults to True.
        - header_level (Optional[int]): Specifies the markdown header level for the
          table name.
          If None, the table name is included without a header. Defaults to None
          (no header level).

        Returns
        -------
        - str: A string in Markdown format detailing the table name
          (with optional header level),
          keyspace (optional), comment, columns, partition keys, clustering keys
          (with optional clustering order),
          and indexes.

        """
        output = ""
        if header_level is not None:
            output += f"{'#' * header_level} "
        output += f"Table Name: {self.table_name}\n"

        if include_keyspace:
            output += f"- Keyspace: {self.keyspace}\n"
        if self.comment:
            output += f"- Comment: {self.comment}\n"

        output += "- Columns\n"
        for column, type in self.columns:
            output += f"  - {column} ({type})\n"

        output += f"- Partition Keys: ({', '.join(self.partition)})\n"
        output += "- Clustering Keys: "
        if self.clustering:
            cluster_list = []
            for column, clustering_order in self.clustering:
                if clustering_order.lower() == "none":
                    cluster_list.append(column)
                else:
                    cluster_list.append(f"{column} {clustering_order}")
            output += f"({', '.join(cluster_list)})\n"

        if self.indexes:
            output += "- Indexes\n"
            for name, kind, options in self.indexes:
                output += f"  - {name} : kind={kind}, options={options}\n"

        return output

        Generates a Markdown representation of the Cassandra table schema, allowing for
        customizable header levels for the table name section.

        Parameters
        ----------
        - include_keyspace (bool): If True, includes the keyspace in the output.
          Defaults to True.
        - header_level (Optional[int]): Specifies the markdown header level for the
          table name.
          If None, the table name is included without a header. Defaults to None
          (no header level).

        Returns
        -------
        - str: A string in Markdown format detailing the table name
          (with optional header level),
          keyspace (optional), comment, columns, partition keys, clustering keys
          (with optional clustering order),
          and indexes.

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