code: def _create_moving_sequence(image, pad_lefts, total_padding):
    
  
    with tf.name_scope("moving_sequence"):
      def get_padded_image(args):
        pad_left, = args
        pad_right = total_padding - pad_left
        padding = tf.stack([pad_left, pad_right], axis=-1)
        z = tf.zeros((1, 2), dtype=pad_left.dtype)
        padding = tf.concat([padding, z], axis=0)
        return tf.pad(image, padding)
  
      padded_images = tf.map_fn(
          get_padded_image, [pad_lefts], dtype=tf.uint8, infer_shape=False,
          back_prop=False)
  
    return padded_images
docs: Create a moving image sequence from the given image a left padding values.
  
    Args:
      image: [in_h, in_w, n_channels] uint8 array
      pad_lefts: [sequence_length, 2] int32 array of left padding values
      total_padding: tensor of padding values, (pad_h, pad_w)
  
    Returns:
      [sequence_length, out_h, out_w, n_channels] uint8 image sequence, where
        out_h = in_h + pad_h, out_w = in_w + out_w