

def get_or_add_image(self, image_descriptor):
    '\n        Return an (rId, image) 2-tuple for the image identified by\n        *image_descriptor*. *image* is an |Image| instance providing access\n        to the properties of the image, such as dimensions and image type.\n        *rId* is the key for the relationship between this document part and\n        the image part, reused if already present, newly created if not.\n        '
    image_part = self._package.image_parts.get_or_add_image_part(self)
    rId = self.relate_to(image_part, RT.IMAGE)
    return (rId, image_part.image)

dataset/ETHPy150Open python-openxml/python-docx/docx/parts/document.py DocumentPart.get_or_add_image/VarMisuse@24/178 `image_descriptor`->`self`