code: def test_batch_graph_data_with_user_defined_attributes(self):
      edge_index = np.array([[0, 1], [1, 0]])
      node_features_shape = 5
      n_nodes = 2
      g1 = GraphData(
          node_features=np.random.randn(n_nodes, node_features_shape),
          edge_index=edge_index,
          user_defined_attribute1=[0, 1],
      )
  
      g2 = GraphData(
          node_features=np.random.randn(n_nodes, node_features_shape),
          edge_index=edge_index,
          user_defined_attribute1=[2, 3],
      )
  
      g3 = GraphData(
          node_features=np.random.randn(n_nodes, node_features_shape),
          edge_index=edge_index,
          user_defined_attribute1=[4, 5],
      )
      g = BatchGraphData([g1, g2, g3])
  
      assert hasattr(g, "user_defined_attribute1")
      assert (
          g.user_defined_attribute1
          == np.array([[0, 1], [2, 3], [4, 5]])
      ).all()
  
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 7 for calling the TestGraph obj's underlying member method code with example usage: obj.test_batch_graph_data_with_user_defined_attributes() without return types