docstr: Rescale an image by a scale factor. image = image * scale.
  
  Args:
      image (`np.ndarray`):
          Image to rescale.
      scale (`float`):
          The scaling factor to rescale pixel values by.
      data_format (`str` or `ChannelDimension`, *optional*):
          The channel dimension format for the output image. If unset, the channel dimension format of the input
          image is used. Can be one of:
          - `"channels_first"` or `ChannelDimension.FIRST`: image in (num_channels, height, width) format.
          - `"channels_last"` or `ChannelDimension.LAST`: image in (height, width, num_channels) format.
      input_data_format (`ChannelDimension` or `str`, *optional*):
          The channel dimension format for the input image. If unset, the channel dimension format is inferred
          from the input image. Can be one of:
          - `"channels_first"` or `ChannelDimension.FIRST`: image in (num_channels, height, width) format.
          - `"channels_last"` or `ChannelDimension.LAST`: image in (height, width, num_channels) format.
  
  Returns:
      `np.ndarray`: The rescaled image.
docstr_tok: ["Rescale","an","image","by","a","scale","factor",".","image","=","image","*","scale",".","Args",":","image","(","`","np.ndarray","`",")",":","Image","to","rescale",".","scale","(","`","float","`",")",":","The","scaling","factor","to","rescale","pixel","values","by",".","data_format","(","`","str","`","or","`","ChannelDimension","`",",","*","optional","*",")",":","The","channel","dimension","format","for","the","output","image",".","If","unset",",","the","channel","dimension","format","of","the","input","image","is","used",".","Can","be","one","of",":","-","`","``","channels_first","''","`","or","`","ChannelDimension.FIRST","`",":","image","in","(","num_channels",",","height",",","width",")","format",".","-","`","``","channels_last","''","`","or","`","ChannelDimension.LAST","`",":","image","in","(","height",",","width",",","num_channels",")","format",".","input_data_format","(","`","ChannelDimension","`","or","`","str","`",",","*","optional","*",")",":","The","channel","dimension","format","for","the","input","image",".","If","unset",",","the","channel","dimension","format","is","inferred","from","the","input","image",".","Can","be","one","of",":","-","`","``","channels_first","''","`","or","`","ChannelDimension.FIRST","`",":","image","in","(","num_channels",",","height",",","width",")","format",".","-","`","``","channels_last","''","`","or","`","ChannelDimension.LAST","`",":","image","in","(","height",",","width",",","num_channels",")","format",".","Returns",":","`","np.ndarray","`",":","The","rescaled","image","."]
code: def rescale(
      self,
      image: np.ndarray,
      scale: float,
      data_format: Optional[Union[str, ChannelDimension]] = None,
      input_data_format: Optional[Union[str, ChannelDimension]] = None,
      **kwargs,
  ) -> np.ndarray:
      """
      Rescale an image by a scale factor. image = image * scale.
  
      Args:
          image (`np.ndarray`):
              Image to rescale.
          scale (`float`):
              The scaling factor to rescale pixel values by.
          data_format (`str` or `ChannelDimension`, *optional*):
              The channel dimension format for the output image. If unset, the channel dimension format of the input
              image is used. Can be one of:
              - `"channels_first"` or `ChannelDimension.FIRST`: image in (num_channels, height, width) format.
              - `"channels_last"` or `ChannelDimension.LAST`: image in (height, width, num_channels) format.
          input_data_format (`ChannelDimension` or `str`, *optional*):
              The channel dimension format for the input image. If unset, the channel dimension format is inferred
              from the input image. Can be one of:
              - `"channels_first"` or `ChannelDimension.FIRST`: image in (num_channels, height, width) format.
              - `"channels_last"` or `ChannelDimension.LAST`: image in (height, width, num_channels) format.
  
      Returns:
          `np.ndarray`: The rescaled image.
      """
      return rescale(
          image,
          scale=scale,
          data_format=data_format,
          input_data_format=input_data_format,
          **kwargs,
      )
  
imports: import copy
  import json
  import os
  import warnings
  from io import BytesIO
  from typing import Any, Dict, Iterable, List, Optional, Tuple, Union
  import numpy
  import requests
  from .dynamic_module_utils import custom_object_save
  from .feature_extraction_utils import BatchFeature
  from .image_transforms import center_crop, normalize, rescale
  from .image_utils import ChannelDimension
  from .utils import IMAGE_PROCESSOR_NAME, PushToHubMixin, add_model_info_to_auto_map, cached_file, copy_func, download_url, is_offline_mode, is_remote_url, is_vision_available, logging
label_desc: Use image node_id 4 for calling the BaseImageProcessor obj's underlying member method code with example usage: obj.rescale(image, scale, data_format, input_data_format) and returns: rescale