class_docstr: Minesweeper dataset from the 'A Critical Look at the Evaluation of GNNs under Heterophily:
  Are We Really Making Progress? <https://arxiv.org/abs/2302.11640>'__ paper.
  
  This dataset is inspired by the Minesweeper game. The graph is a regular 100x100 grid where each
  node (cell) is connected to eight neighboring nodes (with the exception of nodes at the edge of
  the grid, which have fewer neighbors). 20% of the nodes are randomly selected as mines. The task
  is to predict which nodes are mines. The node features are one-hot-encoded numbers of
  neighboring mines. However, for randomly selected 50% of the nodes, the features are unknown,
  which is indicated by a separate binary feature.
  
  Statistics:
  
  - Nodes: 10000
  - Edges: 78804
  - Classes: 2
  - Node features: 7
  - 10 train/val/test splits
  
  Parameters
  ----------
  raw_dir : str, optional
      Raw file directory to store the processed data. Default: ~/.dgl/
  force_reload : bool, optional
      Whether to re-download the data source. 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 node classes
  
  
  Examples
  --------
  
  >>> from dgl.data import MinesweeperDataset
  >>> dataset = MinesweeperDataset()
  >>> g = dataset[0]
  >>> num_classes = dataset.num_classes
  
  >>> # get node features
  >>> feat = g.ndata["feat"]
  
  >>> # get the first data split
  >>> train_mask = g.ndata["train_mask"][:, 0]
  >>> val_mask = g.ndata["val_mask"][:, 0]
  >>> test_mask = g.ndata["test_mask"][:, 0]
  
  >>> # get labels
  >>> label = g.ndata['label']
class_docstr_tok: ["Minesweeper","dataset","from","the","'","A","Critical","Look","at","the","Evaluation","of","GNNs","under","Heterophily",":","Are","We","Really","Making","Progress","?","<","https",":","\/\/arxiv.org\/abs\/2302.11640",">","'__","paper",".","This","dataset","is","inspired","by","the","Minesweeper","game",".","The","graph","is","a","regular","100x100","grid","where","each","node","(","cell",")","is","connected","to","eight","neighboring","nodes","(","with","the","exception","of","nodes","at","the","edge","of","the","grid",",","which","have","fewer","neighbors",")",".","20","%","of","the","nodes","are","randomly","selected","as","mines",".","The","task","is","to","predict","which","nodes","are","mines",".","The","node","features","are","one-hot-encoded","numbers","of","neighboring","mines",".","However",",","for","randomly","selected","50","%","of","the","nodes",",","the","features","are","unknown",",","which","is","indicated","by","a","separate","binary","feature",".","Statistics",":","-","Nodes",":","10000","-","Edges",":","78804","-","Classes",":","2","-","Node","features",":","7","-","10","train\/val\/test","splits","Parameters","--","--","--","--","--","raw_dir",":","str",",","optional","Raw","file","directory","to","store","the","processed","data",".","Default",":","~\/.dgl\/","force_reload",":","bool",",","optional","Whether","to","re-download","the","data","source",".","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","node","classes","Examples","--","--","--","--",">",">",">","from","dgl.data","import","MinesweeperDataset",">",">",">","dataset","=","MinesweeperDataset","(",")",">",">",">","g","=","dataset","[","0","]",">",">",">","num_classes","=","dataset.num_classes",">",">",">","#","get","node","features",">",">",">","feat","=","g.ndata","[","``","feat","''","]",">",">",">","#","get","the","first","data","split",">",">",">","train_mask","=","g.ndata","[","``","train_mask","''","]","[",":",",","0","]",">",">",">","val_mask","=","g.ndata","[","``","val_mask","''","]","[",":",",","0","]",">",">",">","test_mask","=","g.ndata","[","``","test_mask","''","]","[",":",",","0","]",">",">",">","#","get","labels",">",">",">","label","=","g.ndata","[","'label","'","]"]
code: def __init__(
      self,
      raw_dir=None,
      force_reload=False,
      verbose=True,
      transform=None,
  ):
      super(MinesweeperDataset, self).__init__(
          name="minesweeper",
          raw_dir=raw_dir,
          force_reload=force_reload,
          verbose=verbose,
          transform=transform,
      )
  
imports: import os
  import numpy
  from ..convert import graph
  from ..transforms.functional import to_bidirected
  from .dgl_dataset import DGLBuiltinDataset
  from .utils import download
label_desc: Use image node_id 1 to create a new MinesweeperDataset object from inherited base classes: HeterophilousGraphDataset with example: obj = MinesweeperDataset(raw_dir, force_reload, verbose, transform)