def recoverpix(doc, item):
x = item[<NUM_LIT:0>]  <EOL>s = item[<NUM_LIT:1>]  <EOL>try:<EOL><INDENT>pix1 = fitz.Pixmap(doc, x)     <EOL><DEDENT>except:<EOL><INDENT>print("<STR_LIT>" % x + doc._getGCTXerrmsg())<EOL>return None                    <EOL><DEDENT>if s == <NUM_LIT:0>:                    <EOL><INDENT>return pix1               <EOL><DEDENT>try:<EOL><INDENT>pix2 = fitz.Pixmap(doc, s)    <EOL><DEDENT>except:<EOL><INDENT>print("<STR_LIT>" % (s,x))<EOL>return pix1               <EOL><DEDENT>if not (pix1.irect == pix2.irect andpix1.alpha == pix2.alpha == <NUM_LIT:0> andpix2.n == <NUM_LIT:1>):<EOL><INDENT>print("<STR_LIT>", pix1, "<STR_LIT>", pix2)<EOL>return pix1<EOL><DEDENT>pix = fitz.Pixmap(pix1)       <EOL>pix.setAlpha(pix2.samples)    <EOL>pix1 = pix2 = None            <EOL>return pix<EOL>
Return pixmap for item, which is a list of 2 xref numbers. Second xref
    is that of an smask if > 0.
    Return None for any error.