code: def two_linear_train(inputs, idx):
      """
      Make a bi-linear block with optional residual connection
  
      Args
          xin: the batch that enters the block
          idx: integer. Number of layer (for naming/scoping)
          Returns
      y: the batch after it leaves the block
      """
  
      output_size = IN_JOINTS * F
  
      # Linear 1
      input_size1 = int(inputs.get_shape()[1])
      output = Mask_layer(
          in_channels=input_size1,
          out_channels=output_size,
          name=["w2" + str(idx), "b2" + str(idx)],
      )(inputs)
      output = batch_normalization_warp(output)
      output = Dropout(keep=0.8)(output)
  
      # Linear 2
      input_size2 = int(output.get_shape()[1])
      output = Mask_layer(
          in_channels=input_size2,
          out_channels=output_size,
          name=["w3_" + str(idx), "b3_" + str(idx)],
      )(output)
      output = batch_normalization_warp(output)
      output = Dropout(keep=0.8)(output)
  
      # Residual every 2 blocks
      output = Elementwise(combine_fn=tf.add)([inputs, output])
  
      return output
  
imports: import numpy
  import tensorflow
  from tensorlayer.layers import Layer, Dropout, Dense, Input, BatchNorm, Reshape, Elementwise
  from tensorlayer.models import Model
  from tensorlayer import logging
  from .common import mask_weight, neighbour_matrix
label_desc: Use image node_id 2 for calling a global function with example usage: two_linear_train(inputs, idx) and returns: output