class_docstr: A Loader for [disjoint mode](https://graphneural.network/data-modes/#disjoint-mode).
  
  This loader represents a batch of graphs via their disjoint union.
  
  The loader automatically computes a batch index tensor, containing integer
  indices that map each node to its corresponding graph in the batch.
  
  The adjacency matrix os returned as a SparseTensor, regardless of the input.
  
  If `node_level=False`, the labels are interpreted as graph-level labels and
  are stacked along an additional dimension.
  If `node_level=True`, then the labels are stacked vertically.
  
  **Note:** TensorFlow 2.4 or above is required to use this Loader's `load()`
  method in a Keras training loop.
  
  **Arguments**
  
  - `dataset`: a graph Dataset;
  - `node_level`: bool, if `True` stack the labels vertically for node-level
  prediction;
  - `batch_size`: size of the mini-batches;
  - `epochs`: number of epochs to iterate over the dataset. By default (`None`)
  iterates indefinitely;
  - `shuffle`: whether to shuffle the data at the start of each epoch.
  
  **Output**
  
  For each batch, returns a tuple `(inputs, labels)`.
  
  `inputs` is a tuple containing:
  
  - `x`: node attributes of shape `[n_nodes, n_node_features]`;
  - `a`: adjacency matrices of shape `[n_nodes, n_nodes]`;
  - `e`: edge attributes of shape `[n_edges, n_edge_features]`;
  - `i`: batch index of shape `[n_nodes]`.
  
  `labels` have shape `[batch, n_labels]` if `node_level=False` or
  `[n_nodes, n_labels]` otherwise.
code: def collate(self, batch):
      packed = self.pack(batch)
  
      y = packed.pop("y_list", None)
      if y is not None:
          y = collate_labels_disjoint(y, node_level=self.node_level)
  
      output = to_disjoint(**packed)
      output = sp_matrices_to_sp_tensors(output)
  
      if len(output) == 1:
          output = output[0]
  
      if y is None:
          return output
      else:
          return output, y
  
imports: import numpy
  import tensorflow
  from spektral.data.utils import batch_generator, collate_labels_batch, collate_labels_disjoint, get_spec, prepend_none, sp_matrices_to_sp_tensors, to_batch, to_disjoint, to_mixed, to_tf_signature
label_desc: Use image node_id 2 for calling the DisjointLoader obj's underlying member method code with example usage: obj.collate(batch) and returns: output, output,  y