docstr: take final feature
docstr_tok: ["take","final","feature"]
code: def take_final_feature(self, feature, index, name):
      """take final feature"""
      feat = L.gather(feature, index, overwrite=False)
  
      if self.config.final_fc:
          feat = linear(feat, self.config.hidden_size, name)
  
      if self.config.final_l2_norm:
          feat = L.l2_normalize(feat, axis=1)
      return feat
  
imports: import os
  import json
  import numpy
  import pgl
  import paddle.fluid
  import paddle.fluid.layers
  from ernie import ErnieModel
  from pgl.utils.logger import log
label_desc: Use image node_id 2 for calling the ERNIESageV2Encoder obj's underlying member method code with example usage: obj.take_final_feature(feature, index, name) and returns: feat