I have this:

And I want to have 25 clusters. So I used this:
from sklearn.cluster import AgglomerativeClustering
hc = AgglomerativeClustering(n_clusters = 25, affinity = 'euclidean', linkage = 'ward')
y_hc = hc.fit_predict(df)
df['class'] = y_hc
Now to show these clusters I used this code however in the labels it shows label count but I want to show the cluster lable
linkage_matrix = hierarchy.linkage(df.iloc[:, :-2], method='ward', metric='euclidean')
# Plot the dendrogram
plt.figure(figsize=(12, 6))
dendrogram = hierarchy.dendrogram(linkage_matrix,labels=df['cluster'].values,p=25,truncate_mode='lastp',leaf_font_size=10, leaf_rotation=90)
plt.xlabel('Genomes')
plt.ylabel('Euclidean distances')
plt.title(f'Hierarchical Clustering Dendrogram (method="ward")')
plt.show()

dfis not defined. presumably a dataframe or some kind.