code: def test_homogeneous_graph_schema(example_graph_schema):
      # Create dummy graph schema
      gs = example_graph_schema(bb=0)
  
      assert gs.node_index("A") == 0
      assert gs.node_index("B") == 1
  
      assert gs.edge_index(EdgeType("A", "a0", "A")) == 0
      assert gs.edge_index(EdgeType("A", "ab0", "B")) == 1
      assert gs.edge_index(EdgeType("B", "ab0", "A")) == 2
  
      # Directed schema
      gs = example_graph_schema(ba=0, bb=0)
  
      assert gs.edge_index(EdgeType("A", "a0", "A")) == 0
      assert gs.edge_index(EdgeType("A", "ab0", "B")) == 1
  
      with pytest.raises(ValueError):
          gs.edge_index(EdgeType("B", "ab0", "A"))
  
file_path: stellargraph/tests/core/test_schema.py
imports: import pytest
  from stellargraph.core.schema import *
  import itertools
label_desc: Use image node_id 2 for calling a global function with example usage: test_homogeneous_graph_schema(example_graph_schema) without return types