@staticmethod
def translate(value, left_min, left_max, right_min, right_max):
    """Map a value from left span to right span."""
    left_span = left_max - left_min
    right_span = right_max - right_min
    value_scaled = float(value - left_min) / float(left_span)
    return int(right_min + value_scaled * right_span)
