code: def label_to_onehot(labels):
      """Return one-hot representations of labels"""
      onehot_labels = []
      for label in labels:
          if label == 0:
              onehot_labels.append([1, 0])
          else:
              onehot_labels.append([0, 1])
      onehot_labels = np.array(onehot_labels)
      return onehot_labels
  
file_path: PGL/legacy/examples/SAGPool/dataloader.py
imports: import numpy
  import collections
  import paddle
  import pgl
  from pgl.utils.logger import log
  from pgl.graph import Graph, MultiGraph
label_desc: Use image node_id 3 for calling a global function with example usage: label_to_onehot(labels) and returns: onehot_labels