'Fills in an ImageData PB from this Image instance.
Args:
imagedata: An ImageData PB instance'

def _set_imagedata(self, imagedata):

    if self._blob_key:
        imagedata.set_content('')
        imagedata.set_blob_key(self._blob_key)
    else:
        imagedata.set_content(self._image_data)
