code: def test_invalid_graph_data(self):
      with self.assertRaises(ValueError):
          invalid_node_features_type = list(
              np.random.random_sample((5, 32))
          )
          edge_index = np.array(
              [
                  [0, 1, 2, 2, 3, 4],
                  [1, 2, 0, 3, 4, 0],
              ]
          )
          _ = GraphData(
              node_features=invalid_node_features_type,
              edge_index=edge_index,
          )
  
      with self.assertRaises(ValueError):
          node_features = np.random.random_sample((5, 32))
          invalid_edge_index_shape = np.array(
              [
                  [0, 1, 2, 2, 3, 4],
                  [1, 2, 0, 3, 4, 5],
              ]
          )
          _ = GraphData(
              node_features=node_features,
              edge_index=invalid_edge_index_shape,
          )
  
      with self.assertRaises(ValueError):
          node_features = np.random.random_sample((5, 5))
          invalid_edge_index_shape = np.array(
              [
                  [0, 1, 2, 2, 3, 4],
                  [1, 2, 0, 3, 4, 0],
                  [2, 2, 1, 4, 0, 3],
              ],
          )
          _ = GraphData(
              node_features=node_features,
              edge_index=invalid_edge_index_shape,
          )
  
      with self.assertRaises(TypeError):
          node_features = np.random.random_sample((5, 32))
          _ = GraphData(node_features=node_features)
  
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 2 for calling the TestGraph obj's underlying member method code with example usage: obj.test_invalid_graph_data() without return types