class_docstr: Unit tests for :func:`networkx.generators.interval_graph.interval_graph`
docstr: test all possible overlaps
docstr_tok: ["test","all","possible","overlaps"]
code: def test_interval_graph_4(self):
      """test all possible overlaps"""
      intervals = [
          (0, 2),
          (-2, -1),
          (-2, 0),
          (-2, 1),
          (-2, 2),
          (-2, 3),
          (0, 1),
          (0, 2),
          (0, 3),
          (1, 2),
          (1, 3),
          (2, 3),
          (3, 4),
      ]
  
      expected_graph = nx.Graph()
      expected_graph.add_nodes_from(intervals)
      expected_nbrs = {
          (-2, 0),
          (-2, 1),
          (-2, 2),
          (-2, 3),
          (0, 1),
          (0, 2),
          (0, 3),
          (1, 2),
          (1, 3),
          (2, 3),
      }
      actual_g = nx.interval_graph(intervals)
      actual_nbrs = nx.neighbors(actual_g, (0, 2))
  
      assert set(actual_nbrs) == expected_nbrs
  
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 7 for calling the TestIntervalGraph obj's underlying member method code with example usage: obj.test_interval_graph_4() without return types