human
Complete this python program:
def conv_out_shp(IR, IC, KR, KC, border_mode, subsample):
assistant
#Here is the Python code you requested.

    """.. todo::
    WRITEME
    """
    (ssR, ssC) = subsample
    def ceildiv(x, y):
        r = (x // y)
        if ((r * y) < x):
            return (r + 1)
        return r
    if (border_mode == 'valid'):
        (OR, OC) = (ceildiv(((IR - KR) + 1), ssR), ceildiv(((IC - KC) + 1), ssC))
    elif (border_mode == 'full'):
        (OR, OC) = (ceildiv(((IR + KR) - 1), ssR), ceildiv(((IC + KC) - 1), ssC))
    else:
        raise NotImplementedError(border_mode)
    return (OR, OC)