<｜begin▁of▁sentence｜>### Instruction:
Given the Condensed Matter Collaborations 2005 graph which you can read from a GML file named cond-mat-2005.gml, can you use the EVA (Eigenvector-based Attribute-Aware) function in cdlib to perform attribute-aware community detection? And can you compute the purity of the detected communities? The 'purity' measures the homogeneity of the most frequent labels carried by the nodes within the communities.

Notes: You need to print the purity of the detected communities.
### Response:
from cdlib.algorithms import eva
from cdlib import evaluation
import networkx as nx
import random

# Read the graph
G = nx.read_gml('cond-mat-2005.gml')

# Create random attributes for the nodes
topics = ['Quantum Mechanics', 'Statistical Mechanics', 'Solid State', 'Soft Condensed Matter']
attributes = {}
for node in G.nodes():
    attributes[node] = {'topic': random.choice(topics)}

# Perform Attribute-Aware Network Segmentation
communities = eva.eva(G, attributes, alpha=0.5)

# Evaluate purity of the detected communities
purity_score = evaluation.purity(communities)
print(purity_score)
<|EOT|>
