<｜begin▁of▁sentence｜>### Instruction:
Given a path graph with 5 nodes, can you find a maximal independent set using the NetworkX `maximal_independent_set` function?
### Response:
import networkx as nx

# Creating a graph
G = nx.path_graph(5)

# Generating a random maximal independent set
maximal_iset = nx.maximal_independent_set(G, seed=42)

print('Maximal Independent Set:', maximal_iset)
<|EOT|>
