class_docstr: Model for predicting autofills given context.
class_docstr_tok: ["Model","for","predicting","autofills","given","context","."]
code: def apply_pooling(self, x, layer):
      if "pooling" not in layer:
          return x
      pooling = layer["pooling"]
      return tf.nn.max_pool(
          x,
          ksize=[1, pooling[0], pooling[1], 1],
          strides=[1, pooling[0], pooling[1], 1],
          padding=layer["pool_pad"],
      )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import collections
  import os
  from magenta.models.coconet import lib_hparams
  from magenta.models.coconet import lib_tfutil
  import tensorflow.compat.v1
label_desc: Use image node_id 23 for calling the CoconetGraph obj's underlying member method code with example usage: obj.apply_pooling(x, layer) and returns: tf, x