def pick_pixel_sizes(pixel_sizes):
    """
    Process a list of pixel sizes and pick sizes to set for new image.
    If we have different sizes from different images, return None
    """
    pix_size = None
    for px in pixel_sizes:
        if px is None:
            continue
        if pix_size is None:
            pix_size = px
        elif pix_size.getValue() != px.getValue() or pix_size.getUnit(
            ) != px.getUnit():
            return None
    return pix_size
