code: def _time_to_batch(value, dilation, pad_with=0):
      with tf.name_scope("time_to_batch"):
          shape = tf.shape(value)
          pad_elements = (
              dilation - 1 - (shape[1] + dilation - 1) % dilation
          )
          padded = tf.pad(
              value,
              [[0, 0], [0, pad_elements], [0, 0]],
              constant_values=pad_with,
          )
          reshaped = tf.reshape(padded, [-1, dilation, shape[2]])
          transposed = tf.transpose(reshaped, perm=[1, 0, 2])
          return (
              tf.reshape(
                  transposed, [shape[0] * dilation, -1, shape[2]]
              ),
              pad_elements,
          )
  
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 2 for calling a global function with example usage: _time_to_batch(value, dilation, pad_with) and returns: tf,  pad_elements