code: def collate_labels_disjoint(y_list, node_level=False):
      """
      Collates the given list of labels for disjoint mode.
  
      If `node_level=False`, the labels can be scalars or must have shape `[n_labels, ]`.
      If `node_level=True`, the labels must have shape `[n_nodes, ]` (i.e., a scalar label
      for each node) or `[n_nodes, n_labels]`.
  
      :param y_list: a list of np.arrays or scalars.
      :param node_level: bool, whether to pack the labels as node-level or graph-level.
      :return:
          - If `node_level=False`: a np.array of shape `[len(y_list), n_labels]`.
          - If `node_level=True`: a np.array of shape `[n_nodes_total, n_labels]`, where
          `n_nodes_total = sum(y.shape[0] for y in y_list)`.
      """
      if node_level:
          if len(np.shape(y_list[0])) == 1:
              y_list = [y_[:, None] for y_ in y_list]
          return np.vstack(y_list)
      else:
          if len(np.shape(y_list[0])) == 0:
              y_list = [np.array([y_]) for y_ in y_list]
          return np.array(y_list)
  
file_path: spektral/spektral/data/utils.py
imports: import numpy
  import tensorflow
  from scipy import sparse
  from spektral.utils import pad_jagged_array
  from spektral.utils.sparse import sp_matrix_to_sp_tensor
label_desc: Use image node_id 10 for calling a global function with example usage: collate_labels_disjoint(y_list, node_level) and returns: np, np