static IndexTable getIndexTable(DBHandle db, TableRecord indexTableRecord) throws IOException {
		String name = indexTableRecord.getName();
		Table primaryTable = db.getTable(name);
		if (primaryTable == null) {
			throw new AssertException("Table not found: " + name);
		}

		Field keyFieldType = indexTableRecord.getSchema().getKeyFieldType();
		if (keyFieldType instanceof IndexField) {
			return new FieldIndexTable(primaryTable, indexTableRecord);
		}
		throw new AssertException(
			"Unexpected index field type: " + keyFieldType.getClass().getName());
	}
Get the index table for a specified index TableRecord.
@param db database handle
@param indexTableRecord master table record for an index table
@return IndexTable index table
@throws IOException thrown if IO error occurs
Ghidra/Framework/DB/src/main/java/db/IndexTable.java