class_docstr: main model 
class_docstr_tok: ["main","model"]
docstr: pooling layer
docstr_tok: ["pooling","layer"]
code: def pooling_layer(self, x, time_len):
      """pooling layer"""
      with tf.variable_scope("time_pooling"):
          if self.attention:
              x, self.alphas = common_layers.attention(
                  x, self.netconf["attention_size"], return_alphas=True
              )
              # alphas shape [batch, time, 1] -> [1, batch, time, 1]-> [1, time, batch, 1]
              tf.summary.image(
                  "alignment",
                  tf.transpose(
                      tf.expand_dims(self.alphas, 0), [0, 2, 1, 3]
                  ),
              )
          else:
              if self.netconf["use_lstm_layer"]:
                  x = tf.concat(x, 2)
              # [batch, seq_len, dim, 1]
              x = tf.expand_dims(x, axis=-1)
              seq_len = time_len
              x = common_layers.max_pool(
                  x, ksize=[seq_len, 1], strides=[seq_len, 1]
              )
              if self.netconf["use_lstm_layer"]:
                  x = tf.reshape(x, [-1, 2 * self.netconf["cell_num"]])
              else:
                  x = tf.reshape(x, [-1, self.netconf["linear_num"]])
          return x
  
imports: from absl import logging
  import delta.compat
  from delta import utils
  from delta.layers import common_layers
  from delta.data.feat.tf_speech_feature import speech_params, extract_feature
  from delta.models.base_model import RawModel
  from delta.utils.register import registers
label_desc: Use image node_id 7 for calling the EmoCRNNRawModel obj's underlying member method code with example usage: obj.pooling_layer(x, time_len) and returns: x