def METHOD_NAME(self, msg):
    alpha = msg.reduce_softmax(msg["alpha"])
    alpha = paddle.reshape(alpha, [-1, self.num_heads, 1])
    if self.attn_drop > 1e-15:
        alpha = self.attn_dropout(alpha)
    feature = msg["h"]
    feature = paddle.reshape(feature,
                             [-1, self.num_heads, self.hidden_size])
    feature = feature * alpha
    if self.concat:
        feature = paddle.reshape(feature,
                                 [-1, self.num_heads * self.hidden_size])
    else:
        feature = paddle.mean(feature, axis=1)
    feature = msg.reduce(feature, pool_type="sum")
    return feature