code: def rescale(data, new_min=0, new_max=1, data_min=None, data_max=None):
      """Rescale/normalize the data to be within the range `[new_min, new_max]`
      If data_min and data_max are explicitly provided, they will be used
      as the old min/max values instead of taken from the data.
  
      .. note::
          This is same as the `scipy.MinMaxScaler` with the exception that we can override
          the min/max of the old scale.
  
      Args:
          data (numpy.ndarray): 1d scores vector or 2d score matrix (users x items).
          new_min (int|float): The minimum of the newly scaled data.
          new_max (int|float): The maximum of the newly scaled data.
          data_min (None|number): The minimum of the passed data [if omitted it will be inferred].
          data_max (None|number): The maximum of the passed data [if omitted it will be inferred].
  
      Returns:
          numpy.ndarray: The newly scaled/normalized data.
      """
      data_min = data.min() if data_min is None else data_min
      data_max = data.max() if data_max is None else data_max
      return (data - data_min) / (data_max - data_min) * (
          new_max - new_min
      ) + new_min
  
file_path: recommenders/recommenders/utils/python_utils.py
imports: import logging
  import numpy
  from scipy import sparse
label_desc: Use image node_id 11 for calling a global function with example usage: rescale(data, new_min, new_max, data_min, data_max) and returns: unknown