<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def shift_and_scale(matrix, shift, scale):
 """ Shift and scale matrix so its minimum value is placed at `shift` and its maximum value is scaled to `scale` """


    zeroed = matrix - matrix.min()
    scaled = (scale - shift) * (zeroed / zeroed.max())
    return scaled + shift