class_docstr: Unit tests for :func:`networkx.generators.interval_graph.interval_graph`
code: def test_interval_graph_2(self):
      intervals = [(1, 2), [3, 5], [6, 8], (9, 10)]
  
      expected_graph = nx.Graph()
      expected_graph.add_nodes_from([(1, 2), (3, 5), (6, 8), (9, 10)])
  
      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 5 for calling the TestIntervalGraph obj's underlying member method code with example usage: obj.test_interval_graph_2() without return types