class_docstr: A data generator for node prediction with homogeneous GraphSAGE models
  on directed graphs.
  
  At minimum, supply the StellarDiGraph, the batch size, and the number of
  node samples (separately for in-nodes and out-nodes)
  for each layer of the GraphSAGE model.
  
  The supplied graph should be a StellarDiGraph object with node features.
  
  Use the :meth:`flow` method supplying the nodes and (optionally) targets
  to get an object that can be used as a Keras data generator.
  
  Example::
  
      G_generator = DirectedGraphSAGENodeGenerator(G, 50, [10,5], [5,1])
      train_data_gen = G_generator.flow(train_node_ids, train_node_labels)
      test_data_gen = G_generator.flow(test_node_ids)
  
  .. seealso::
  
     Model using this generator: :class:`.DirectedGraphSAGE`.
  
     Example using this generator: `node classification <https://stellargraph.readthedocs.io/en/stable/demos/node-classification/directed-graphsage-node-classification.html>`__.
  
     Related functionality:
  
     - :class:`.Neo4jDirectedGraphSAGENodeGenerator` for using :class:`.DirectedGraphSAGE` with Neo4j
     - :class:`.CorruptedGenerator` for unsupervised training using :class:`.DeepGraphInfomax`
     - :class:`.DirectedGraphSAGELinkGenerator` for link prediction and related tasks
     - :class:`.GraphSAGENodeGenerator` for undirected graphs
     - :class:`.HinSAGENodeGenerator` for heterogeneous graphs
  
  Args:
      G (StellarDiGraph): The machine-learning ready graph.
      batch_size (int): Size of batch to return.
      in_samples (list): The number of in-node samples per layer (hop) to take.
      out_samples (list): The number of out-node samples per layer (hop) to take.
      seed (int): [Optional] Random seed for the node sampler.
      weighted (bool, optional): If True, sample neighbours using the edge weights in the graph.
class_docstr_tok: ["A","data","generator","for","node","prediction","with","homogeneous","GraphSAGE","models","on","directed","graphs",".","At","minimum",",","supply","the","StellarDiGraph",",","the","batch","size",",","and","the","number","of","node","samples","(","separately","for","in-nodes","and","out-nodes",")","for","each","layer","of","the","GraphSAGE","model",".","The","supplied","graph","should","be","a","StellarDiGraph","object","with","node","features",".","Use","the",":","meth",":","`","flow","`","method","supplying","the","nodes","and","(","optionally",")","targets","to","get","an","object","that","can","be","used","as","a","Keras","data","generator",".","Example",":",":","G_generator","=","DirectedGraphSAGENodeGenerator","(","G",",","50",",","[","10,5","]",",","[","5,1","]",")","train_data_gen","=","G_generator.flow","(","train_node_ids",",","train_node_labels",")","test_data_gen","=","G_generator.flow","(","test_node_ids",")","..","seealso",":",":","Model","using","this","generator",":",":","class",":","`",".DirectedGraphSAGE","`",".","Example","using","this","generator",":","`","node","classification","<","https",":","\/\/stellargraph.readthedocs.io\/en\/stable\/demos\/node-classification\/directed-graphsage-node-classification.html",">","`","__",".","Related","functionality",":","-",":","class",":","`",".Neo4jDirectedGraphSAGENodeGenerator","`","for","using",":","class",":","`",".DirectedGraphSAGE","`","with","Neo4j","-",":","class",":","`",".CorruptedGenerator","`","for","unsupervised","training","using",":","class",":","`",".DeepGraphInfomax","`","-",":","class",":","`",".DirectedGraphSAGELinkGenerator","`","for","link","prediction","and","related","tasks","-",":","class",":","`",".GraphSAGENodeGenerator","`","for","undirected","graphs","-",":","class",":","`",".HinSAGENodeGenerator","`","for","heterogeneous","graphs","Args",":","G","(","StellarDiGraph",")",":","The","machine-learning","ready","graph",".","batch_size","(","int",")",":","Size","of","batch","to","return",".","in_samples","(","list",")",":","The","number","of","in-node","samples","per","layer","(","hop",")","to","take",".","out_samples","(","list",")",":","The","number","of","out-node","samples","per","layer","(","hop",")","to","take",".","seed","(","int",")",":","[","Optional","]","Random","seed","for","the","node","sampler",".","weighted","(","bool",",","optional",")",":","If","True",",","sample","neighbours","using","the","edge","weights","in","the","graph","."]
code: def default_corrupt_input_index_groups(self):
      # everything can be shuffled together
      return [list(range(self._max_slots()))]
  
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 4 for calling the DirectedGraphSAGENodeGenerator obj's underlying member method code with example usage: obj.default_corrupt_input_index_groups() and returns: list