code: def get_graph_labels(graph):
      if isinstance(graph, GeneralStaticGraph):
          if "label" in graph.nodes.data and BACKEND == "dgl":
              return graph.nodes.data["label"]
          if "y" in graph.nodes.data and BACKEND == "pyg":
              return graph.nodes.data["y"]
          return None
      if BACKEND == "pyg" and hasattr(graph, "y"):
          return graph.y
      if BACKEND == "dgl" and "label" in graph.ndata:
          return graph.ndata["label"]
      return None
  
imports: import random
  import typing
  import torch
  import torch.backends.cudnn
  import numpy
  import pandas
  from ..backend import DependentBackend
  from ..data import Dataset
  from ..data.graph import GeneralStaticGraph
  from ..utils import get_logger
label_desc: Use image node_id 5 for calling a global function with example usage: get_graph_labels(graph) and returns: None, None, graph, graph, graph, graph