code: def forward(self, x):
      extract_layers = []
      for depth, layer_block in enumerate(self.block_list):
          x = layer_block(x)
          if (depth + 1) in self.extract_layers:
              extract_layers.append(x)
  
      return extract_layers
  
imports: from typing import List, Tuple
  import numpy
  import paddle
  import paddle.nn
  from paddle import Tensor
  from medicalseg.cvlibs import manager
label_desc: Use image node_id 2 for calling the TransformerEncoder obj's underlying member method code with example usage: obj.forward(x) and returns: extract_layers