class_docstr: Unit tests for the :meth:`MultiGraph.edge_subgraph` method.
class_docstr_tok: ["Unit","tests","for","the",":","meth",":","`","MultiGraph.edge_subgraph","`","method","."]
code: def setup_method(self):
      # Create a doubly-linked path graph on five nodes.
      G = nx.MultiGraph()
      nx.add_path(G, range(5))
      nx.add_path(G, range(5))
      # Add some node, edge, and graph attributes.
      for i in range(5):
          G.nodes[i]["name"] = f"node{i}"
      G.adj[0][1][0]["name"] = "edge010"
      G.adj[0][1][1]["name"] = "edge011"
      G.adj[3][4][0]["name"] = "edge340"
      G.adj[3][4][1]["name"] = "edge341"
      G.graph["name"] = "graph"
      # Get the subgraph induced by one of the first edges and one of
      # the last edges.
      self.G = G
      self.H = G.edge_subgraph([(0, 1, 0), (3, 4, 1)])
  
imports: from collections import UserDict
  import pytest
  import networkx
  from networkx.utils import edges_equal
  from .test_graph import BaseAttrGraphTester
  from .test_graph import TestGraph
label_desc: Use image node_id 1 for calling the TestEdgeSubgraph obj's underlying member method code with example usage: obj.setup_method() without return types