code: def overlay_text(
      video_path: str,
      output_path: Optional[str] = None,
      text_len: int = 10,
      text_change_nth: Optional[int] = None,
      fonts: Optional[List[Tuple[Any, Optional[str]]]] = None,
      fontscales: Optional[Tuple[float, float]] = None,
      colors: Optional[List[Tuple[int, int, int]]] = None,
      thickness: Optional[int] = None,
      random_movement: bool = False,
      topleft: Optional[Tuple[float, float]] = None,
      bottomright: Optional[Tuple[float, float]] = None,
      metadata: Optional[List[Dict[str, Any]]] = None,
      **kwargs,
  ) -> str:
      """
      Overlays random text onto a 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 text_len: length of string for randomized texts.
  
      @param text_change_nth: change random text every nth frame. None means
          using same text for all frames.
  
      @param fonts: list of fonts to sample from. Each font can be a cv2 fontFace,
          a PIL ImageFont, or a path to a PIL ImageFont file. Each font is coupled with
          a chars file (the second item in the tuple) - a path to a file which contains
          the characters associated with the given font. For example, non-western
          alphabets have different valid characters than the roman alphabet, and these
          must be specified in order to construct random valid text in that font. If the
          chars file path is None, the roman alphabet will be used.
  
      @param fontscales: 2-tuple of float (min_scale, max_scale).
  
      @param colors: list of (R, G, B) colors to sample from
  
      @param thickness: specify the thickness desired for the text.
  
      @param random_movement: whether or not you want the text to randomly move around
          across frame or to move across in a "linear" way
  
      @param topleft: specifying the boundary of text region. The boundary are all
          floats [0, 1] representing the fraction w.r.t width/height
  
      @param bottomright: specifying the boundary of text region. The boundary are all
          floats [0, 1] representing the fraction w.r.t width/height
  
      @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
      )
  
      text_aug = ac.VideoDistractorByText(
          text_len,
          text_change_nth,
          fonts,
          fontscales,
          colors,
          thickness,
          random_movement,
          topleft,
          bottomright,
      )
      vdutils.apply_cv2_augmenter(
          text_aug, video_path, output_path, **kwargs
      )
  
      if metadata is not None:
          helpers.get_metadata(
              metadata=metadata,
              function_name="overlay_text",
              **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 30 for calling a global function with example usage: overlay_text(video_path, output_path, text_len, text_change_nth, fonts, fontscales, colors, thickness, random_movement, topleft, bottomright, metadata) and returns: unknown