def map_rescale_value(self, value, from_min, from_max, to_min, to_max):
        """ Converts number from one scale/range to another """
        # Calculate the percentage of value between from_min and from_max
        percentage = (value - from_min) / (from_max - from_min)
        # Map the percentage to the range between to_min and to_max
        mapped_value = percentage * (to_max - to_min) + to_min
        return mapped_value
 Converts number from one scale/range to another 
durdraw/durdraw_ui_curses.py