class_docstr: BA-2motifs dataset from `Parameterized Explainer for Graph Neural Network
  <https://arxiv.org/abs/2011.04573>`__
  
  This is a synthetic dataset for graph classification. It was generated by
  performing the following steps in order.
  
  - Construct 1000 base Barabási–Albert (BA) graphs.
  - Attach house-structured network motifs to half of the base BA graphs.
  - Attach five-node cycle motifs to the rest base BA graphs.
  - Assign each graph to one of two classes according to the type of the attached motif.
  
  Parameters
  ----------
  raw_dir : str, optional
      Raw file directory to download and store the data. Default: ~/.dgl/
  force_reload : bool, optional
      Whether to reload the dataset. Default: False
  verbose : bool, optional
      Whether to print progress information. Default: True
  transform : callable, optional
      A transform that takes in a :class:`~dgl.DGLGraph` object and returns
      a transformed version. The :class:`~dgl.DGLGraph` object will be
      transformed before every access. Default: None
  
  Attributes
  ----------
  num_classes : int
      Number of graph classes
  
  Examples
  --------
  
  >>> from dgl.data import BA2MotifDataset
  >>> dataset = BA2MotifDataset()
  >>> dataset.num_classes
  2
  >>> # Get the first graph and its label
  >>> g, label = dataset[0]
  >>> feat = g.ndata['feat']
class_docstr_tok: ["BA-2motifs","dataset","from","`","Parameterized","Explainer","for","Graph","Neural","Network","<","https",":","\/\/arxiv.org\/abs\/2011.04573",">","`","__","This","is","a","synthetic","dataset","for","graph","classification",".","It","was","generated","by","performing","the","following","steps","in","order",".","-","Construct","1000","base","Barab\u00e1si\u2013Albert","(","BA",")","graphs",".","-","Attach","house-structured","network","motifs","to","half","of","the","base","BA","graphs",".","-","Attach","five-node","cycle","motifs","to","the","rest","base","BA","graphs",".","-","Assign","each","graph","to","one","of","two","classes","according","to","the","type","of","the","attached","motif",".","Parameters","--","--","--","--","--","raw_dir",":","str",",","optional","Raw","file","directory","to","download","and","store","the","data",".","Default",":","~\/.dgl\/","force_reload",":","bool",",","optional","Whether","to","reload","the","dataset",".","Default",":","False","verbose",":","bool",",","optional","Whether","to","print","progress","information",".","Default",":","True","transform",":","callable",",","optional","A","transform","that","takes","in","a",":","class",":","`","~dgl.DGLGraph","`","object","and","returns","a","transformed","version",".","The",":","class",":","`","~dgl.DGLGraph","`","object","will","be","transformed","before","every","access",".","Default",":","None","Attributes","--","--","--","--","--","num_classes",":","int","Number","of","graph","classes","Examples","--","--","--","--",">",">",">","from","dgl.data","import","BA2MotifDataset",">",">",">","dataset","=","BA2MotifDataset","(",")",">",">",">","dataset.num_classes","2",">",">",">","#","Get","the","first","graph","and","its","label",">",">",">","g",",","label","=","dataset","[","0","]",">",">",">","feat","=","g.ndata","[","'feat","'","]"]
code: def num_classes(self):
      return 2
  
imports: import math
  import os
  import pickle
  import random
  import networkx
  import numpy
  from ..None import backend
  from ..batch import batch
  from ..convert import graph
  from ..transforms import reorder_graph
  from .dgl_dataset import DGLBuiltinDataset
  from .utils import _get_dgl_url, download, load_graphs, save_graphs
label_desc: Use image node_id 10 for calling the BA2MotifDataset obj's underlying member method code with example usage: obj.num_classes() and returns: int