code: def cross_attention2(self, x1, batch1, x2, batch2):
      att_scores = torch.mm(x1, x2.T)
      att_scores[batch1.view(-1, 1) != batch2.view(1, -1)] = -float(
          "inf"
      )
  
      att_weights1 = F.softmax(att_scores, dim=1)
      att_weights2 = F.softmax(att_scores.T, dim=1)
      attentions1 = x1 - torch.mm(att_weights1, x2)
      attentions2 = x2 - torch.mm(att_weights2, x1)
  
      return attentions1, attentions2
  
imports: import torch
  import torch.nn
  import torch.nn.functional
  from torch_scatter import scatter
  from torch_geometric.nn import global_add_pool, global_mean_pool, global_max_pool, GINConv
label_desc: Use image node_id 7 for calling the GMNConv obj's underlying member method code with example usage: obj.cross_attention2(x1, batch1, x2, batch2) and returns: attentions1,  attentions2