<｜begin▁of▁sentence｜>### Instruction:
How can you create a path graph in NetworkX where the parameter can be either the number of nodes as an integer or an iterable of node labels?
### Response:
import networkx as nx

@nx.utils.nodes_or_number(0)
def create_path_graph(n):
    # 'n' is either an int or an iterable of nodes
    return nx.path_graph(n)

# Create a path graph with 5 nodes
path_graph = create_path_graph(5)

# Create a path graph using an iterable of nodes
path_graph_custom_nodes = create_path_graph(['A', 'B', 'C', 'D', 'E'])
print(path_graph.nodes())
print(path_graph_custom_nodes.nodes())
<|EOT|>
