docstr: Computes a scalar score for each edge of the given graph.
  
  Parameters
  ----------
  edges :
      Has three members ``src``, ``dst`` and ``data``, each of
      which is a dictionary representing the features of the
      source nodes, the destination nodes, and the edges
      themselves.
  
  Returns
  -------
  dict
      A dictionary of new edge features.
docstr_tok: ["Computes","a","scalar","score","for","each","edge","of","the","given","graph",".","Parameters","--","--","--","--","--","edges",":","Has","three","members","``","src","``",",","``","dst","``","and","``","data","``",",","each","of","which","is","a","dictionary","representing","the","features","of","the","source","nodes",",","the","destination","nodes",",","and","the","edges","themselves",".","Returns","--","--","--","-","dict","A","dictionary","of","new","edge","features","."]
code: def apply_edges(self, edges):
      """
      Computes a scalar score for each edge of the given graph.
  
      Parameters
      ----------
      edges :
          Has three members ``src``, ``dst`` and ``data``, each of
          which is a dictionary representing the features of the
          source nodes, the destination nodes, and the edges
          themselves.
  
      Returns
      -------
      dict
          A dictionary of new edge features.
      """
      h = torch.cat([edges.src["h"], edges.dst["h"]], 1)
      return {"score": self.W2(F.relu(self.W1(h))).squeeze(1)}
  
imports: import itertools
  import os
  import dgl
  import dgl.data
  import numpy
  import scipy.sparse
  import torch
  import torch.nn
  import torch.nn.functional
  from dgl.nn import SAGEConv
  import dgl.function
  from sklearn.metrics import roc_auc_score
label_desc: Use image node_id 2 for calling the MLPPredictor obj's underlying member method code with example usage: obj.apply_edges(edges) and returns: dict