code: def datapipe_graph_to_adjlist(datapipe_graph):
      """Given a DataPipe graph returned by
      :func:`torch.utils.data.graph.traverse_dps` in DAG form, convert it into
      adjacency list form.
  
      Namely, :func:`torch.utils.data.graph.traverse_dps` returns the following
      data structure:
  
      .. code::
  
         {
             id(datapipe): (
                 datapipe,
                 {
                     id(parent1_of_datapipe): (parent1_of_datapipe, {...}),
                     id(parent2_of_datapipe): (parent2_of_datapipe, {...}),
                     ...
                 }
             )
         }
  
      We convert it into the following for easier access:
  
      .. code::
  
         {
             id(datapipe1): (
                 datapipe1,
                 [id(parent1_of_datapipe1), id(parent2_of_datapipe1), ...]
             ),
             id(datapipe2): (
                 datapipe2,
                 [id(parent1_of_datapipe2), id(parent2_of_datapipe2), ...]
             ),
             ...
         }
      """
  
      result_dict = {}
      _get_parents(result_dict, datapipe_graph)
      return result_dict
  
label_desc: Use image node_id 2 for calling a global function with example usage: datapipe_graph_to_adjlist(datapipe_graph) and returns: result_dict