<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def preprocess(net, image):
    '''
    convert to Caffe input image layout
    '''
    return np.float32(np.rollaxis(image, 2)[::-1]) - net.transformer.mean["data"]