<｜begin▁of▁sentence｜>### Instruction:
Given a graph G with node features and edges [(0, 1), (1, 2)], can you use the FeatherNode model to generate embeddings for the nodes where the feature matrix X is a sparse matrix with non-zero diagonal values?
### Response:
import networkx as nx
from karateclub import FeatherNode
import numpy as np
from scipy.sparse import coo_matrix

# Create a simple graph with node features
G = nx.Graph()
G.add_nodes_from(
    [(0, {'feature': np.array([0, 1])}),
     (1, {'feature': np.array([1, 0])}),
     (2, {'feature': np.array([1, 1])})]
)
G.add_edges_from([(0, 1), (1, 2)])

# Create a feature matrix using COO format
row  = np.array([0, 1, 2])
col  = np.array([0, 1, 2])
data = np.array([1, 1, 1])
X = coo_matrix((data, (row, col)), shape=(3, 3))

# Initialize and fit the FeatherNode model
model = FeatherNode()
model.fit(G, X)

# Get the embedding
embedding = model.get_embedding()
print(embedding)
<|EOT|>
