class_docstr: Test IO operations on heterogeneous 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)
  
      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
  
      # graph nodes of self.node_type type should have a self.target_attribute attribute
      graph_id = G_epgm.G["graphs"][0]["id"]
      assert self.target_attribute in G_epgm.node_attributes(
          graph_id, self.node_type
      )
  
      # graph should have 260 vertices
      n_nodes = 260
      nodes = G_epgm.G["vertices"]
      assert len(nodes) == n_nodes
  
      # 'user' nodes should have 3 unique values for 'elite' attribute:
      # first make sure that all nodes have 'data' key
      assert sum(["data" in v for v in nodes]) == n_nodes
      labels_all = [v["data"].get(self.target_attribute) for v in nodes]
      labels = list(filter(lambda l: l is not None, labels_all))
      assert len(np.unique(labels)) == 3
  
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_Heterogeneous obj's underlying member method code with example usage: obj.test_load_epgm() without return types