'Return an |ImagePart| instance containing the image identified by
*image_descriptor*, newly created if a matching one is not present in
the collection.'

def get_or_add_image_part(self, image_descriptor):

    image = Image.from_file(image_descriptor)
    matching_image_part = self._get_by_sha1(image.sha1)
    if (matching_image_part is not None):
        return matching_image_part
    return self._add_image_part(image)
