code: def forward(self, node_repr, bond_length_index, bond_length, mask):
      node_i, node_j = bond_length_index
      node_i_repr = paddle.index_select(node_repr, node_i)
      node_j_repr = paddle.index_select(node_repr, node_j)
      node_ij_repr = paddle.concat([node_i_repr, node_j_repr], 1)
      bond_length_pred = self.bond_length_pred_linear(node_ij_repr)
      bond_length_pred = paddle.masked_select(bond_length_pred, mask)
      bond_length_pred = paddle.reshape(bond_length_pred, (-1,))
      bond_length = paddle.masked_select(bond_length, mask)
      bond_length = paddle.reshape(bond_length, (-1,))
      loss = self.loss(bond_length_pred, bond_length)
      loss = paddle.mean(loss)
      return loss
  
imports: import os
  import sys
  import math
  import numpy
  import paddle
  import paddle.nn
  import paddle.nn.functional
  import pgl.nn
  from pgl.utils.logger import log
  import models.conv
  import models.mol_encoder
  import models.layers
label_desc: Use image node_id 2 for calling the PretrainBondLength obj's underlying member method code with example usage: obj.forward(node_repr, bond_length_index, bond_length, mask) and returns: loss