<｜begin▁of▁sentence｜>### Instruction:
Using the 'numpy_to_contiguous_memoryview' function from 'igraph', how can you convert a NumPy adjacency matrix to a memoryview and create an igraph graph from it? Note: The data this code uses is a NumPy array representing the adjacency matrix of a simple graph, and the problem this code solves is the creation of an 'igraph' Graph object directly from the NumPy adjacency matrix.
### Response:
import igraph as ig
import numpy as np

# Given a NumPy array representing the adjacency matrix of a graph
adj_matrix = np.array([[0, 1, 0], [1, 0, 1], [0, 1, 0]])

# Convert the NumPy array to a contiguous memoryview
memoryview = ig.utils.numpy_to_contiguous_memoryview(adj_matrix)

# Create a graph from the memoryview
graph = ig.Graph.Adjacency(memoryview.tolist())

# Print the summary of the graph
g.summary()
<|EOT|>
