def METHOD_NAME(
    self,
    index_cls: Type[BaseIndex],
    ignore_db_schema: bool = False,
    **index_kwargs: Any,
) -> BaseIndex:
    """Derive index from context."""
    full_context_dict = self._get_context_dict(ignore_db_schema)
    context_docs = []
    for table_name, context_str in full_context_dict.items():
        doc = Document(text=context_str, metadata={"table_name": table_name})
        context_docs.append(doc)
    index = index_cls.from_documents(
        documents=context_docs,
        **index_kwargs,
    )
    return index