code: def _dilated_causal_max_pool(
      value, kernel_size, dilation, padding="left"
  ):
      pool_op = lambda x, padding: _causalmax(
          x, dim=1, pool_len=kernel_size, padding_type=padding
      )
      with tf.name_scope("causal_pool"):
          if dilation > 1:
              transformed, pad_elements = _time_to_batch(
                  value, dilation, pad_with=-1e4
              )
              pooled = pool_op(transformed, padding)
              restored = batch_to_time(pooled, dilation)
              restored = restored[
                  :, : tf.shape(restored)[1] - pad_elements, :
              ]
          else:
              restored = pool_op(value, padding)
  
          restored.set_shape(value.get_shape())
          return restored
  
file_path: finetune/finetune/custom_ops/indico_tf_ops/python/ra.py
imports: import os
  import math
  import tensorflow
  from finetune.custom_ops.indico_tf_ops.python import indico_ops
label_desc: Use image node_id 4 for calling a global function with example usage: _dilated_causal_max_pool(value, kernel_size, dilation, padding) and returns: restored