<｜begin▁of▁sentence｜>### Instruction:
As an industrial engineer specializing in optimization, could you please utilize the Stochastic Block Model (SBM) community detection algorithm, with a Description Length (DL) minimization heuristic, on the 'polbooks' dataset representing books about US politics? Output the communities in a JSON format to assist in identifying key connections and relationships in the political landscape.
### Response:
import networkx as nx
from cdlib import algorithms

# Read the polbooks graph
G = nx.read_gml('polbooks.gml')

# Apply the Stochastic Block Model using the Description Length minimization
coms = algorithms.sbm_dl(G)

# Output the JSON representation of the detected communities
communities_json = coms.to_json()
print(communities_json)
<|EOT|>
