class_docstr: Test IO operations on heterogeneous EPGM graphs
docstr: Test the .node_attributes() method
docstr_tok: ["Test","the",".node_attributes","(",")","method"]
code: def test_node_attributes(self):
      """Test the .node_attributes() method"""
      G_epgm = EPGM(self.input_dir)
      graph_id = G_epgm.G["graphs"][0]["id"]
  
      # dataset has 1 unique 'user' node attribute, 'elite'
      node_attributes = G_epgm.node_attributes(graph_id, self.node_type)
  
      assert self.target_attribute in node_attributes
      assert (
          len(node_attributes) == 1
      ), "There should be 1 unique node attribute; found {}".format(
          len(node_attributes)
      )
  
      # passing a non-existent node type should return an empty array of node attributes:
      assert len(G_epgm.node_attributes(graph_id, "business")) == 0
  
      # if node_type is not supplied, a TypeError should be raised:
      with pytest.raises(TypeError):
          G_epgm.node_attributes(graph_id)
  
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 3 for calling the Test_EPGM_IO_Heterogeneous obj's underlying member method code with example usage: obj.test_node_attributes() without return types