code: def _fill_rectangle_video(
      image,
      center_width,
      center_height,
      half_width,
      half_height,
      replace=None,
  ):
      """Fills blank area for video."""
      image_time = tf.shape(image)[0]
      image_height = tf.shape(image)[1]
      image_width = tf.shape(image)[2]
  
      lower_pad = tf.maximum(0, center_height - half_height)
      upper_pad = tf.maximum(
          0, image_height - center_height - half_height
      )
      left_pad = tf.maximum(0, center_width - half_width)
      right_pad = tf.maximum(0, image_width - center_width - half_width)
  
      cutout_shape = [
          image_time,
          image_height - (lower_pad + upper_pad),
          image_width - (left_pad + right_pad),
      ]
      padding_dims = [
          [0, 0],
          [lower_pad, upper_pad],
          [left_pad, right_pad],
      ]
      mask = tf.pad(
          tf.zeros(cutout_shape, dtype=image.dtype),
          padding_dims,
          constant_values=1,
      )
      mask = tf.expand_dims(mask, -1)
      mask = tf.tile(mask, [1, 1, 1, 3])
  
      if replace is None:
          fill = tf.random.normal(tf.shape(image), dtype=image.dtype)
      elif isinstance(replace, tf.Tensor):
          fill = replace
      else:
          fill = tf.ones_like(image, dtype=image.dtype) * replace
      image = tf.where(tf.equal(mask, 0), fill, image)
  
      return image
  
imports: import functools
  import math
  from typing import Optional
  from absl import logging
  from dmvr import builders
  from dmvr import processors
  import simclr.tf2.data_util
  import tensorflow
  from official.vision.image_classification import augment
label_desc: Use image node_id 2 for calling a global function with example usage: _fill_rectangle_video(image, center_width, center_height, half_width, half_height, replace) and returns: image