def image_attachement(cid, filename=None):
filename = '<STR_LIT>'<EOL>with open(filename, '<STR_LIT:rb>') as fp:<EOL><INDENT>img = MIMEImage(fp.read(), '<STR_LIT>')<EOL>img.add_header('<STR_LIT>', f'<STR_LIT>')<EOL>if filename:<EOL><INDENT>img.add_header('<STR_LIT>', '<STR_LIT>', filename=filename)<EOL><DEDENT>return img<EOL><DEDENT>
cid='image1'
<img src="cid:image1">