<｜begin▁of▁sentence｜>### Instruction:
Given a graph created as a path graph with 4 nodes, can you use NetworkX to calculate its spectral bipartivity?
### Response:
import networkx as nx
from networkx.algorithms import bipartite

G = nx.path_graph(4)
sb = bipartite.spectral_bipartivity(G)
print(sb)
<|EOT|>
