class_docstr: Test IO operations on homogeneous EPGM graphs
docstr: Test that the EPGM is loaded correctly from epgm path
docstr_tok: ["Test","that","the","EPGM","is","loaded","correctly","from","epgm","path"]
code: def test_load_epgm(self):
      """Test that the EPGM is loaded correctly from epgm path"""
      G_epgm = EPGM(self.input_dir)
      print(self.input_dir)
  
      assert "graphs" in G_epgm.G.keys()
      assert "vertices" in G_epgm.G.keys()
      assert "edges" in G_epgm.G.keys()
  
      # check that G_epgm.G['graphs] has at least one graph head:
      assert len(G_epgm.G["graphs"]) > 0
  
      # cora nodes should have a subject attribute
      graph_id = G_epgm.G["graphs"][0]["id"]
      assert self.target_attribute in G_epgm.node_attributes(
          graph_id, self.node_type
      )
  
      # cora should have 2708 vertices
      n_nodes = 2708
      nodes = G_epgm.G["vertices"]
      assert len(nodes) == n_nodes
  
      # cora nodes should have 7 unique values for subject attribute:
      assert sum(["data" in v for v in nodes]) == n_nodes
      subjects = np.unique(
          [v["data"][self.target_attribute] for v in nodes]
      )
      assert len(subjects) == 7
  
file_path: stellargraph/tests/data/test_epgm.py
imports: import pytest
  import os
  import numpy
  from stellargraph.data.epgm import EPGM
label_desc: Use image node_id 1 for calling the Test_EPGM_IO_Homogeneous obj's underlying member method code with example usage: obj.test_load_epgm() without return types