class_docstr: Abstract base class for graph data generators.
  
  The supplied graph should be a StellarGraph object that is ready for
  machine learning.
  
  Do not use this base class: use a subclass specific to the method.
  
  Args:
      G (StellarGraph): The machine-learning ready graph.
      batch_size (int): Size of batch to return.
      schema (GraphSchema): [Optional] Schema for the graph, for heterogeneous graphs.
class_docstr_tok: ["Abstract","base","class","for","graph","data","generators",".","The","supplied","graph","should","be","a","StellarGraph","object","that","is","ready","for","machine","learning",".","Do","not","use","this","base","class",":","use","a","subclass","specific","to","the","method",".","Args",":","G","(","StellarGraph",")",":","The","machine-learning","ready","graph",".","batch_size","(","int",")",":","Size","of","batch","to","return",".","schema","(","GraphSchema",")",":","[","Optional","]","Schema","for","the","graph",",","for","heterogeneous","graphs","."]
code: def __init__(
      self, G, batch_size, schema=None, use_node_features=True
  ):
      if not isinstance(G, StellarGraph):
          raise TypeError(
              "Graph must be a StellarGraph or StellarDiGraph object."
          )
  
      self.graph = G
      self.batch_size = batch_size
  
      # This is a node generator and requries a model with one root nodes per query
      self.multiplicity = 1
  
      # We need a schema for compatibility with HinSAGE
      if schema is None:
          self.schema = G.create_graph_schema()
      elif isinstance(schema, GraphSchema):
          self.schema = schema
      else:
          raise TypeError("Schema must be a GraphSchema object")
  
      # We will need real node types here
      self.head_node_types = None
  
      # Create sampler for GraphSAGE
      self.sampler = None
  
      # Check if the graph has features
      if use_node_features:
          G.check_graph_for_ml()
  
imports: import warnings
  import operator
  import random
  import abc
  import warnings
  import numpy
  import itertools
  import networkx
  import scipy.sparse
  from tensorflow.keras import backend
  from functools import reduce
  from tensorflow.keras.utils import Sequence
  from collections import defaultdict
  from ..data import SampledBreadthFirstWalk, SampledHeterogeneousBreadthFirstWalk, DirectedBreadthFirstNeighbours
  from ..core.graph import StellarGraph, GraphSchema
  from ..core.utils import is_real_iterable
  from ..core.validation import comma_sep
  from .None import NodeSequence, Generator
  from ..random import SeededPerBatch
label_desc: Use image node_id 1 to create a new BatchedNodeGenerator object from inherited base classes: Generator with example: obj = BatchedNodeGenerator(G, batch_size, schema, use_node_features)