class_docstr: Generates a random graphs which can be used for testing or other purposes.
  
  The generated graph supports both node-level and graph-level labels.
  
  Example
  -------
  >>> from deepchem.utils.fake_data_generator import FakeGraphGenerator
  >>> fgg  = FakeGraphGenerator(min_nodes=8, max_nodes=10,  n_node_features=5, avg_degree=8, n_edge_features=3, n_classes=2, task='graph', z=5)
  >>> graphs = fgg.sample(n_graphs=10)
  >>> type(graphs)
  <class 'deepchem.data.datasets.NumpyDataset'>
  >>> type(graphs.X[0])
  <class 'deepchem.feat.graph_data.GraphData'>
  >>> len(graphs) == 10  # num_graphs
  True
  
  Note
  ----
  The FakeGraphGenerator class is based on torch_geometric.dataset.FakeDataset
  class.
docstr: Parameters
  ----------
  min_nodes: int, default 10
      Minimum number of permissible nodes in a graph
  max_nodes: int, default 10
      Maximum number of permissible nodes in a graph
  n_node_features: int, default 5
      Average number of node features in a graph
  avg_degree: int, default 4
      Average degree of the graph (avg_degree should be a positive number greater than the min_nodes)
  n_edge_features: int, default 3
      Average number of features in the edge
  task: str, default 'graph'
      Indicates node-level labels or graph-level labels
  kwargs: optional
      Additional graph attributes and their shapes , e.g. `global_features = 5`
docstr_tok: ["Parameters","--","--","--","--","--","min_nodes",":","int",",","default","10","Minimum","number","of","permissible","nodes","in","a","graph","max_nodes",":","int",",","default","10","Maximum","number","of","permissible","nodes","in","a","graph","n_node_features",":","int",",","default","5","Average","number","of","node","features","in","a","graph","avg_degree",":","int",",","default","4","Average","degree","of","the","graph","(","avg_degree","should","be","a","positive","number","greater","than","the","min_nodes",")","n_edge_features",":","int",",","default","3","Average","number","of","features","in","the","edge","task",":","str",",","default","'graph'","Indicates","node-level","labels","or","graph-level","labels","kwargs",":","optional","Additional","graph","attributes","and","their","shapes",",","e.g",".","`","global_features","=","5","`"]
code: def __init__(
      self,
      min_nodes: int = 10,
      max_nodes: int = 10,
      n_node_features: int = 5,
      avg_degree: int = 4,
      n_edge_features: int = 3,
      n_classes: int = 2,
      task: str = "graph",
      **kwargs,
  ):
      """
      Parameters
      ----------
      min_nodes: int, default 10
          Minimum number of permissible nodes in a graph
      max_nodes: int, default 10
          Maximum number of permissible nodes in a graph
      n_node_features: int, default 5
          Average number of node features in a graph
      avg_degree: int, default 4
          Average degree of the graph (avg_degree should be a positive number greater than the min_nodes)
      n_edge_features: int, default 3
          Average number of features in the edge
      task: str, default 'graph'
          Indicates node-level labels or graph-level labels
      kwargs: optional
          Additional graph attributes and their shapes , e.g. `global_features = 5`
      """
      assert avg_degree >= 1, "Average degree should be greater than 0"
      self.min_nodes = min_nodes
      self.max_nodes = max_nodes
      self.avg_degree = avg_degree
      self.n_node_features = n_node_features
      self.n_edge_features = n_edge_features
      self.n_classes = n_classes
      self.task = task
      self.kwargs = kwargs
  
file_path: deepchem/deepchem/utils/fake_data_generator.py
imports: import random
  import numpy
  from deepchem.data import NumpyDataset
  from deepchem.feat import GraphData
label_desc: Use image node_id 1 to create a new FakeGraphGenerator object  with example: obj = FakeGraphGenerator(min_nodes, max_nodes, n_node_features, avg_degree, n_edge_features, n_classes, task)