class_docstr: Unit tests for :func:`networkx.generators.interval_graph.interval_graph`
code: def test_interval_graph_1(self):
      intervals = [(1, 2), (2, 3), (3, 4), (1, 4)]
  
      expected_graph = nx.Graph()
      expected_graph.add_nodes_from(intervals)
      e1 = ((1, 4), (1, 2))
      e2 = ((1, 4), (2, 3))
      e3 = ((1, 4), (3, 4))
      e4 = ((3, 4), (2, 3))
      e5 = ((1, 2), (2, 3))
  
      expected_graph.add_edges_from([e1, e2, e3, e4, e5])
  
      actual_g = interval_graph(intervals)
  
      assert set(actual_g.nodes) == set(expected_graph.nodes)
      assert edges_equal(expected_graph, actual_g)
  
file_path: networkx/networkx/generators/tests/test_interval_graph.py
imports: import math
  import pytest
  import networkx
  from networkx.generators.interval_graph import interval_graph
  from networkx.utils import edges_equal
label_desc: Use image node_id 4 for calling the TestIntervalGraph obj's underlying member method code with example usage: obj.test_interval_graph_1() without return types