class_docstr: Symmetric Stochastic Block Model Mixture
  
  Reference: Appendix C of `Supervised Community Detection with Hierarchical Graph Neural Networks <https://arxiv.org/abs/1705.08415>`_
  
  Parameters
  ----------
  n_graphs : int
      Number of graphs.
  n_nodes : int
      Number of nodes.
  n_communities : int
      Number of communities.
  k : int, optional
      Multiplier. Default: 2
  avg_deg : int, optional
      Average degree. Default: 3
  pq : list of pair of nonnegative float or str, optional
      Random densities. This parameter is for future extension,
      for now it's always using the default value.
      Default: Appendix_C
  rng : numpy.random.RandomState, optional
      Random number generator. If not given, it's numpy.random.RandomState() with `seed=None`,
      which read data from /dev/urandom (or the Windows analogue) if available or seed from
      the clock otherwise.
      Default: None
  
  Raises
  ------
  RuntimeError is raised if pq is not a list or string.
  
  Examples
  --------
  >>> data = SBMMixtureDataset(n_graphs=16, n_nodes=10000, n_communities=2)
  >>> from torch.utils.data import DataLoader
  >>> dataloader = DataLoader(data, batch_size=1, collate_fn=data.collate_fn)
  >>> for graph, line_graph, graph_degrees, line_graph_degrees, pm_pd in dataloader:
  ...     # your code here
docstr: Get one example by index
  
  Parameters
  ----------
  idx : int
      Item index
  
  Returns
  -------
  graph: :class:`dgl.DGLGraph`
      The original graph
  line_graph: :class:`dgl.DGLGraph`
      The line graph of `graph`
  graph_degree: numpy.ndarray
      In degrees for each node in `graph`
  line_graph_degree: numpy.ndarray
      In degrees for each node in `line_graph`
  pm_pd: numpy.ndarray
      Edge indicator matrices Pm and Pd
docstr_tok: ["Get","one","example","by","index","Parameters","--","--","--","--","--","idx",":","int","Item","index","Returns","--","--","--","-","graph",":",":","class",":","`","dgl.DGLGraph","`","The","original","graph","line_graph",":",":","class",":","`","dgl.DGLGraph","`","The","line","graph","of","`","graph","`","graph_degree",":","numpy.ndarray","In","degrees","for","each","node","in","`","graph","`","line_graph_degree",":","numpy.ndarray","In","degrees","for","each","node","in","`","line_graph","`","pm_pd",":","numpy.ndarray","Edge","indicator","matrices","Pm","and","Pd"]
code: def __getitem__(self, idx):
      r"""Get one example by index
  
      Parameters
      ----------
      idx : int
          Item index
  
      Returns
      -------
      graph: :class:`dgl.DGLGraph`
          The original graph
      line_graph: :class:`dgl.DGLGraph`
          The line graph of `graph`
      graph_degree: numpy.ndarray
          In degrees for each node in `graph`
      line_graph_degree: numpy.ndarray
          In degrees for each node in `line_graph`
      pm_pd: numpy.ndarray
          Edge indicator matrices Pm and Pd
      """
      return (
          self._graphs[idx],
          self._line_graphs[idx],
          self._graph_degrees[idx],
          self._line_graph_degrees[idx],
          self._pm_pds[idx],
      )
  
imports: import math
  import os
  import random
  import numpy
  import numpy.random
  import scipy
  from ..None import batch
  from ..convert import from_scipy
  from .dgl_dataset import DGLDataset
  from .utils import load_graphs, load_info, save_graphs, save_info
label_desc: Use image node_id 10 for calling the SBMMixtureDataset obj's underlying member method code with example usage: obj.__getitem__(idx) and returns: self,  self,  self,  self,  self