docstr: Test for graph data when no edges in the graph (example: single atom mol)
docstr_tok: ["Test","for","graph","data","when","no","edges","in","the","graph","(","example",":","single","atom","mol",")"]
code: def test_graph_data_single_atom_mol(self):
      """
      Test for graph data when no edges in the graph (example: single atom mol)
      """
      num_nodes, num_node_features = 1, 32
      num_edges = 0
      node_features = np.random.random_sample(
          (num_nodes, num_node_features)
      )
      edge_index = np.empty((2, 0), dtype=int)
  
      graph = GraphData(
          node_features=node_features, edge_index=edge_index
      )
  
      assert graph.num_nodes == num_nodes
      assert graph.num_node_features == num_node_features
      assert graph.num_edges == num_edges
      assert (
          str(graph)
          == "GraphData(node_features=[1, 32], edge_index=[2, 0], edge_features=None)"
      )
  
file_path: deepchem/deepchem/feat/tests/test_graph_data.py
imports: import unittest
  import numpy
  import pytest
  from deepchem.feat.graph_data import BatchGraphData, GraphData, shortest_path_length
label_desc: Use image node_id 4 for calling the TestGraph obj's underlying member method code with example usage: obj.test_graph_data_single_atom_mol() without return types