code: def get_graph_from_dataset(dataset, graph_id=0):
      if isinstance(dataset, Dataset):
          if BACKEND == "dgl":
              return dataset[graph_id][0]
          else:
              return dataset[graph_id]
      if BACKEND == "pyg":
          return dataset[graph_id]
      if BACKEND == "dgl":
          from dgl import DGLGraph
  
          data = dataset[graph_id]
          if isinstance(data, DGLGraph):
              return data
          return data[0]
  
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 1 for calling a global function with example usage: get_graph_from_dataset(dataset, graph_id) and returns: dataset, data, dataset, dataset, data