<｜begin▁of▁sentence｜>### Instruction:
Given a MultiGraph with multiple edges between nodes 1 and 2, where one edge has a weight of 10 and another a weight of 20, how do you create a view using FilterMultiInner that only includes edges with a weight greater than 15 and print the edges in this filtered view?
### Response:
import networkx as nx

# Create a MultiGraph instance
g = nx.MultiGraph()

# Add multiple edges between the same nodes with different attributes
g.add_edge(1, 2, weight=10)
g.add_edge(1, 2, weight=20)

# Define a filter function that only keeps edges with weight greater than 15
def filter_edge(edge): return edge[2]['weight'] > 15

# Apply the filter to the multigraph
g_filtered_view = nx.classes.coreviews.FilterMultiInner(g._adj, filter_edge)

# Print edges of the filtered view
for edge in g_filtered_view[1][2].values():
    print(edge)
<|EOT|>
