code: def load_graphs(filename, idx_list=None):
      """Load graphs and optionally their labels from file saved by :func:`save_graphs`.
  
      Besides loading from local files, DGL supports loading the graphs directly
      from S3 (by providing a ``"s3://..."`` path) or from HDFS (by providing
      ``"hdfs://..."`` a path).
  
      Parameters
      ----------
      filename: str
          The file name to load graphs from.
      idx_list: list[int], optional
          The indices of the graphs to be loaded if the file contains multiple graphs.
          Default is loading all the graphs stored in the file.
  
      Returns
      --------
      graph_list: list[DGLGraph]
          The loaded graphs.
      labels: dict[str, Tensor]
          The graph labels stored in file. If no label is stored, the dictionary is empty.
          Regardless of whether the ``idx_list`` argument is given or not,
          the returned dictionary always contains the labels of all the graphs.
  
      Examples
      ----------
      Following the example in :func:`save_graphs`.
  
      >>> from dgl.data.utils import load_graphs
      >>> glist, label_dict = load_graphs("./data.bin") # glist will be [g1, g2]
      >>> glist, label_dict = load_graphs("./data.bin", [0]) # glist will be [g1]
  
      See Also
      --------
      save_graphs
      """
      # if it is local file, do some sanity check
      check_local_file_exists(filename)
      version = _CAPI_GetFileVersion(filename)
      if version == 1:
          dgl_warning(
              "You are loading a graph file saved by old version of dgl.  \
              Please consider saving it again with the current format."
          )
          return load_graph_v1(filename, idx_list)
      elif version == 2:
          return load_graph_v2(filename, idx_list)
      else:
          raise DGLError("Invalid DGL Version Number.")
  
imports: from __future__ import absolute_import
  import os
  from ..None import backend
  from .._ffi.function import _init_api
  from .._ffi.object import ObjectBase, register_object
  from ..base import dgl_warning, DGLError
  from ..heterograph import DGLGraph
  from .heterograph_serialize import save_heterographs
label_desc: Use image node_id 4 for calling a global function with example usage: load_graphs(filename, idx_list) and returns: load_graph_v1, load_graph_v2