class_docstr: Abstract class of on-the-fly generator used in the dataset.
  It generates on-the-fly graphs, which will be fed into the model.
class_docstr_tok: ["Abstract","class","of","on-the-fly","generator","used","in","the","dataset",".","It","generates","on-the-fly","graphs",",","which","will","be","fed","into","the","model","."]
code: def _get_size(self, size=None):
      if size is None:
          return np.random.choice(
              self.sizes, size=1, replace=True, p=self.size_prob
          )[0]
      else:
          return size
  
imports: import copy
  import math
  import types
  import random
  import networkx
  import numpy
  import torch
  import deepsnap
  from deepsnap.graph import Graph
  from deepsnap.hetero_graph import HeteroGraph
  import pdb
  from typing import Dict, List, Union
  import warnings
label_desc: Use image node_id 4 for calling the Generator obj's underlying member method code with example usage: obj._get_size(size) and returns: np, size