<｜begin▁of▁sentence｜>### Instruction:
Given a scenario where you need to create a random intersection graph with 5 nodes and 3 attributes, each node having 2 attributes in common, can you use NetworkX to generate such a graph and display its nodes and edges?
### Response:
import networkx as nx

# Using the k_random_intersection_graph function to create an intersection graph
G = nx.generators.intersection.k_random_intersection_graph(n=5, m=3, k=2, seed=42)

# Display nodes and edges of the graph
print('Nodes:', G.nodes())
print('Edges:', G.edges())
<|EOT|>
