<｜begin▁of▁sentence｜>### Instruction:
Given a networkx graph representing a social network, suppose a community detection algorithm has been applied that hierarchically partitions the network. For a particular node within this network, how would you represent its cluster information, including its level in the hierarchy and whether it belongs to a final cluster using the HierarchicalCluster class in graspologic?
### Response:
import networkx as nx
from graspologic.partition import HierarchicalCluster

# Example graph with community structure
G = nx.karate_club_graph()

# Example use of HierarchicalCluster
# Let's say we have identified a node belonging to a cluster with some hierarchy
node_id = 0 # node id
cluster_id = 1 # Leiden cluster id
parent_cluster_id = None # This is the top level, so no parent
level = 0 # Top level of hierarchy
is_final_cluster = True # No further subdivision

# Create an instance of HierarchicalCluster
cluster_info = HierarchicalCluster(node=node_id, cluster=cluster_id, parent_cluster=parent_cluster_id, level=level, is_final_cluster=is_final_cluster)

# You can access the attributes like so:
print(f'Node: {cluster_info.node}, Cluster: {cluster_info.cluster}, Level: {cluster_info.level}, Is final: {cluster_info.is_final_cluster}')
<|EOT|>
