def METHOD_NAME(shape, region_row, shape_columns):
    values = []
    for column in shape_columns:
        values.append(get_column_values(region_row, column))
    if 'rectangle' in shape:
        (xmin, xmax, ymin, ymax) = values[0:4]
        xcenter = 0.5 * (xmin + xmax)
        ycenter = 0.5 * (ymin + ymax)
        xsize = xmax - xmin
        ysize = ymax - ymin
        shape_params = [PixCoord(xcenter, ycenter), xsize, ysize]
        if shape == 'rotrectangle':
            shape_params.append(values[-1])  # angle
        return shape_params
    # center (or polygon) coordinates for all other regions
    shape_params = [PixCoord(values[0], values[1])]
    # shape params
    if shape == 'ellipse':
        # FITS uses semi-axis lengths;
        # the last value is always the rotation angle
        values[2:-1] = list(np.array(values[2:-1]) * 2.)
    shape_params.extend(values[2:])
    return shape_params