code: def reducer(
      frame=None, percentage=0, interpolation=cv2.INTER_LANCZOS4
  ):
      """
      ## reducer
  
      Reduces frame size by given percentage
  
      Parameters:
          frame (numpy.ndarray): inputs numpy array(frame).
          percentage (int/float): inputs size-reduction percentage.
          interpolation (int): Change resize interpolation.
  
      **Returns:**  A reduced numpy ndarray array.
      """
      # check if frame is valid
      if frame is None:
          raise ValueError(
              "[Helper:ERROR] :: Input frame cannot be NoneType!"
          )
  
      # check if valid reduction percentage is given
      if not (percentage > 0 and percentage < 90):
          raise ValueError(
              "[Helper:ERROR] :: Given frame-size reduction percentage is invalid, Kindly refer docs."
          )
  
      if not (isinstance(interpolation, int)):
          raise ValueError(
              "[Helper:ERROR] :: Given interpolation is invalid, Kindly refer docs."
          )
  
      # grab the frame size
      (height, width) = frame.shape[:2]
  
      # calculate the ratio of the width from percentage
      reduction = ((100 - percentage) / 100) * width
      ratio = reduction / float(width)
      # construct the dimensions
      dimensions = (int(reduction), int(height * ratio))
  
      # return the resized frame
      return cv2.resize(frame, dimensions, interpolation=interpolation)
  
imports: import os
  import re
  import sys
  import cv2
  import types
  import errno
  import stat
  import shutil
  import importlib
  import requests
  import numpy
  import logging
  import platform
  import socket
  from tqdm import tqdm
  from contextlib import closing
  from pathlib import Path
  from colorlog import ColoredFormatter
  from pkg_resources import parse_version
  from requests.adapters import HTTPAdapter, Retry
  from ..version import __version__
label_desc: Use image node_id 26 for calling a global function with example usage: reducer(frame, percentage, interpolation) and returns: cv2