def create_index(self, index_type: IndexType, **kwargs: Any) -> None:
        """
        Create an index of the specified type. Run this after populating the table.
        We intentionally throw an error if the index already exists.
        Since you may want to try a different type or parameters, we recommend dropping the index first.

        Parameters
        ----------
            index_type (IndexType): The type of index to create.
            m (optional int): The number of neighbors to consider during construction for PGVECTOR_HSNW index.
            ef_construction (optional int): The construction parameter for PGVECTOR_HSNW index.
            nlists (optional int): The number of lists for PGVECTOR_IVFFLAT index.

        """
        _logger.info(f"Creating index of type {index_type} for {self.table_name}")
        if index_type == IndexType.PGVECTOR_HNSW:
            m = kwargs.get("m")
            ef_construction = kwargs.get("ef_construction")
            if m is None or ef_construction is None:
                raise ValueError(
                    "m and ef_construction must be specified in kwargs for PGVECTOR_HSNW index"
                )
            query = sql.SQL(
                """
                            CREATE INDEX {index_name} ON {table_name} USING hnsw (embedding vector_cosine_ops) WITH (m = {m}, ef_construction = {ef_construction});
                        """
            ).format(
                table_name=sql.Identifier(self.table_name),
                index_name=sql.Identifier(f"{self.table_name}_embedding_idx"),
                m=sql.Literal(m),
                ef_construction=sql.Literal(ef_construction),
            )
            with self._sync_conn.cursor() as cursor:
                try:
                    cursor.execute(query)
                    self._sync_conn.commit()
                except psycopg.errors.DuplicateTable:
                    self._sync_conn.rollback()
                    raise psycopg.errors.DuplicateTable(
                        f"Index {self.table_name}_embedding_idx already exists"
                    )
        elif index_type == IndexType.PGVECTOR_IVFFLAT:
            nlists = kwargs.get("nlists")
            if nlists is None:
                raise ValueError(
                    "nlist must be specified in kwargs for PGVECTOR_IVFFLAT index"
                )
            query = sql.SQL(
                """
                CREATE INDEX {index_name} ON {table_name} USING ivfflat (embedding vector_cosine_ops) WITH (lists = {nlists});
                """
            ).format(
                table_name=sql.Identifier(self.table_name),
                index_name=sql.Identifier(f"{self.table_name}_embedding_idx"),
                nlists=sql.Literal(nlists),
            )
            with self._sync_conn.cursor() as cursor:
                try:
                    cursor.execute(query)
                    self._sync_conn.commit()
                except psycopg.errors.DuplicateTable:
                    self._sync_conn.rollback()
                    raise psycopg.errors.DuplicateTable(
                        f"Index {self.table_name}_embedding_idx already exists"
                    )
        else:
            raise ValueError(f"Unknown index type: {index_type}")

        Create an index of the specified type. Run this after populating the table.
        We intentionally throw an error if the index already exists.
        Since you may want to try a different type or parameters, we recommend dropping the index first.

        Parameters
        ----------
            index_type (IndexType): The type of index to create.
            m (optional int): The number of neighbors to consider during construction for PGVECTOR_HSNW index.
            ef_construction (optional int): The construction parameter for PGVECTOR_HSNW index.
            nlists (optional int): The number of lists for PGVECTOR_IVFFLAT index.

        
llama-index-integrations/vector_stores/llama-index-vector-stores-nile/llama_index/vector_stores/nile/base.py