code: def pad(
      video_path: str,
      output_path: Optional[str] = None,
      w_factor: float = 0.25,
      h_factor: float = 0.25,
      color: Tuple[int, int, int] = utils.DEFAULT_COLOR,
      metadata: Optional[List[Dict[str, Any]]] = None,
  ) -> str:
      """
      Pads the video
  
      @param video_path: the path to the video to be augmented
  
      @param output_path: the path in which the resulting video will be stored.
          If not passed in, the original video file will be overwritten
  
      @param w_factor: pad right and left with w_factor * frame width
  
      @param h_factor: pad bottom and top with h_factor * frame height
  
      @param color: RGB color of the padded margin
  
      @param metadata: if set to be a list, metadata about the function execution
          including its name, the source & dest duration, fps, etc. will be appended
          to the inputted list. If set to None, no metadata will be appended or returned
  
      @returns: the path to the augmented video
      """
      func_kwargs = helpers.get_func_kwargs(
          metadata, locals(), video_path
      )
  
      pad_aug = af.VideoAugmenterByPadding(w_factor, h_factor, color)
      pad_aug.add_augmenter(video_path, output_path)
  
      if metadata is not None:
          helpers.get_metadata(
              metadata=metadata, function_name="pad", **func_kwargs
          )
  
      return output_path or video_path
  
imports: import functools
  import math
  import os
  import shutil
  import tempfile
  from typing import Any, Callable, Dict, List, Optional, Tuple, Union
  import numpy
  from augly import audio, image, utils
  from augly.audio import utils
  from augly.video import helpers, utils
  from augly.video.augmenters import cv2, ffmpeg
label_desc: Use image node_id 31 for calling a global function with example usage: pad(video_path, output_path, w_factor, h_factor, color, metadata) and returns: unknown