class_docstr: Batch GraphData class
  
  Attributes
  ----------
  node_features: np.ndarray
      Concatenated node feature matrix with shape [num_nodes, num_node_features].
      `num_nodes` is total number of nodes in the batch graph.
  edge_index: np.ndarray, dtype int
      Concatenated graph connectivity in COO format with shape [2, num_edges].
      `num_edges` is total number of edges in the batch graph.
  edge_features: np.ndarray, optional (default None)
      Concatenated edge feature matrix with shape [num_edges, num_edge_features].
      `num_edges` is total number of edges in the batch graph.
  node_pos_features: np.ndarray, optional (default None)
      Concatenated node position matrix with shape [num_nodes, num_dimensions].
      `num_nodes` is total number of edges in the batch graph.
  num_nodes: int
      The number of nodes in the batch graph.
  num_node_features: int
      The number of features per node in the graph.
  num_edges: int
      The number of edges in the batch graph.
  num_edges_features: int, optional (default None)
      The number of features per edge in the graph.
  graph_index: np.ndarray, dtype int
      This vector indicates which graph the node belongs with shape [num_nodes,].
  
  Examples
  --------
  >>> import numpy as np
  >>> from deepchem.feat.graph_data import GraphData
  >>> node_features_list = np.random.rand(2, 5, 10)
  >>> edge_index_list = np.array([
  ...    [[0, 1, 2, 3, 4], [1, 2, 3, 4, 0]],
  ...    [[0, 1, 2, 3, 4], [1, 2, 3, 4, 0]],
  ... ], dtype=int)
  >>> user_defined_attribute = np.array([0, 1])
  >>> graph_list = [GraphData(node_features, edge_index, attribute=user_defined_attribute)
  ...     for node_features, edge_index in zip(node_features_list, edge_index_list)]
  >>> batch_graph = BatchGraphData(graph_list=graph_list)
class_docstr_tok: ["Batch","GraphData","class","Attributes","--","--","--","--","--","node_features",":","np.ndarray","Concatenated","node","feature","matrix","with","shape","[","num_nodes",",","num_node_features","]",".","`","num_nodes","`","is","total","number","of","nodes","in","the","batch","graph",".","edge_index",":","np.ndarray",",","dtype","int","Concatenated","graph","connectivity","in","COO","format","with","shape","[","2",",","num_edges","]",".","`","num_edges","`","is","total","number","of","edges","in","the","batch","graph",".","edge_features",":","np.ndarray",",","optional","(","default","None",")","Concatenated","edge","feature","matrix","with","shape","[","num_edges",",","num_edge_features","]",".","`","num_edges","`","is","total","number","of","edges","in","the","batch","graph",".","node_pos_features",":","np.ndarray",",","optional","(","default","None",")","Concatenated","node","position","matrix","with","shape","[","num_nodes",",","num_dimensions","]",".","`","num_nodes","`","is","total","number","of","edges","in","the","batch","graph",".","num_nodes",":","int","The","number","of","nodes","in","the","batch","graph",".","num_node_features",":","int","The","number","of","features","per","node","in","the","graph",".","num_edges",":","int","The","number","of","edges","in","the","batch","graph",".","num_edges_features",":","int",",","optional","(","default","None",")","The","number","of","features","per","edge","in","the","graph",".","graph_index",":","np.ndarray",",","dtype","int","This","vector","indicates","which","graph","the","node","belongs","with","shape","[","num_nodes",",","]",".","Examples","--","--","--","--",">",">",">","import","numpy","as","np",">",">",">","from","deepchem.feat.graph_data","import","GraphData",">",">",">","node_features_list","=","np.random.rand","(","2",",","5",",","10",")",">",">",">","edge_index_list","=","np.array","(","[","...","[","[","0",",","1",",","2",",","3",",","4","]",",","[","1",",","2",",","3",",","4",",","0","]","]",",","...","[","[","0",",","1",",","2",",","3",",","4","]",",","[","1",",","2",",","3",",","4",",","0","]","]",",","...","]",",","dtype=int",")",">",">",">","user_defined_attribute","=","np.array","(","[","0",",","1","]",")",">",">",">","graph_list","=","[","GraphData","(","node_features",",","edge_index",",","attribute=user_defined_attribute",")","...","for","node_features",",","edge_index","in","zip","(","node_features_list",",","edge_index_list",")","]",">",">",">","batch_graph","=","BatchGraphData","(","graph_list=graph_list",")"]
docstr: A GraphData object can have user defined attributes but the attribute name of those
  are unknown since it can be arbitary. This method helps to find user defined attribute's
  name by making a list of known graph data attributes and finding other user defined
  attributes via `vars` method. The user defined attributes are attributes other than
  `node_features`, `edge_index`, `edge_features`, `node_pos_features`, `kwargs`, `num_nodes`,
  `num_node_features`, `num_edges`, `num_edge_features` as these are graph data attributes.
docstr_tok: ["A","GraphData","object","can","have","user","defined","attributes","but","the","attribute","name","of","those","are","unknown","since","it","can","be","arbitary",".","This","method","helps","to","find","user","defined","attribute's","name","by","making","a","list","of","known","graph","data","attributes","and","finding","other","user","defined","attributes","via","`","vars","`","method",".","The","user","defined","attributes","are","attributes","other","than","`","node_features","`",",","`","edge_index","`",",","`","edge_features","`",",","`","node_pos_features","`",",","`","kwargs","`",",","`","num_nodes","`",",","`","num_node_features","`",",","`","num_edges","`",",","`","num_edge_features","`","as","these","are","graph","data","attributes","."]
code: def _get_user_defined_attributes(self, graph_data: GraphData):
      """A GraphData object can have user defined attributes but the attribute name of those
      are unknown since it can be arbitary. This method helps to find user defined attribute's
      name by making a list of known graph data attributes and finding other user defined
      attributes via `vars` method. The user defined attributes are attributes other than
      `node_features`, `edge_index`, `edge_features`, `node_pos_features`, `kwargs`, `num_nodes`,
      `num_node_features`, `num_edges`, `num_edge_features` as these are graph data attributes.
      """
      graph_data_attributes = [
          "node_features",
          "edge_index",
          "edge_features",
          "node_pos_features",
          "kwargs",
          "num_nodes",
          "num_node_features",
          "num_edges",
          "num_edge_features",
      ]
      user_defined_attribute_names = []
      for arg in vars(graph_data):
          if arg not in graph_data_attributes:
              user_defined_attribute_names.append(arg)
      return user_defined_attribute_names
  
file_path: deepchem/deepchem/feat/graph_data.py
imports: from typing import Optional, Sequence
  import numpy
label_desc: Use image node_id 2 for calling the BatchGraphData obj's underlying member method code with example usage: obj._get_user_defined_attributes(graph_data) and returns: user_defined_attribute_names