human
I wrote the below code

    is_color = (len(fromim.shape) == 3)
    def transf(p):
        p2 = dot(H, [p[0], p[1], 1])
        return ((p2[0] / p2[2]), (p2[1] / p2[2]))
    if (H[(1, 2)] < 0):
        print 'warp    -    right'
        if is_color:
            toim_t = hstack((toim, zeros((toim.shape[0], padding, 3))))
            fromim_t = zeros((toim.shape[0], (toim.shape[1] + padding), toim.shape[2]))
            for col in range(3):
                fromim_t[:, :, col] = ndimage.geometric_transform(fromim[:, :, col], transf, (toim.shape[0], (toim.shape[1] + padding)))
        else:
            toim_t = hstack((toim, zeros((toim.shape[0], padding))))
            fromim_t = ndimage.geometric_transform(fromim, transf, (toim.shape[0], (toim.shape[1] + padding)))
    else:
        print 'warp    -    left'
        H_delta = array([[1, 0, 0], [0, 1, (- delta)], [0, 0, 1]])
        H = dot(H, H_delta)
        if is_color:
            toim_t = hstack((zeros((toim.shape[0], padding, 3)), toim))
            fromim_t = zeros((toim.shape[0], (toim.shape[1] + padding), toim.shape[2]))
            for col in range(3):
                fromim_t[:, :, col] = ndimage.geometric_transform(fromim[:, :, col], transf, (toim.shape[0], (toim.shape[1] + padding)))
        else:
            toim_t = hstack((zeros((toim.shape[0], padding)), toim))
            fromim_t = ndimage.geometric_transform(fromim, transf, (toim.shape[0], (toim.shape[1] + padding)))
    if is_color:
        alpha = (((fromim_t[:, :, 0] * fromim_t[:, :, 1]) * fromim_t[:, :, 2]) > 0)
        for col in range(3):
            toim_t[:, :, col] = ((fromim_t[:, :, col] * alpha) + (toim_t[:, :, col] * (1 - alpha)))
    else:
        alpha = (fromim_t > 0)
        toim_t = ((fromim_t * alpha) + (toim_t * (1 - alpha)))
    return toim_t

What's a good function header?

What is a Python code to print 'warp    -    right'?
assistant
#Here is Python code to print 'warp    -    right'
.

def panorama(H, fromim, toim, padding=2400, delta=2400):