def _extract_member(self, member, targetpath, pwd):
<EOL>if (targetpath[-<NUM_LIT:1>:] in (os.path.sep, os.path.altsep)<EOL>and len(os.path.splitdrive(targetpath)[<NUM_LIT:1>]) > <NUM_LIT:1>):<EOL><INDENT>targetpath = targetpath[:-<NUM_LIT:1>]<EOL><DEDENT>if member.filename[<NUM_LIT:0>] == '<STR_LIT:/>':<EOL><INDENT>targetpath = os.path.join(targetpath, member.filename[<NUM_LIT:1>:])<EOL><DEDENT>else:<EOL><INDENT>targetpath = os.path.join(targetpath, member.filename)<EOL><DEDENT>targetpath = os.path.normpath(targetpath)<EOL>upperdirs = os.path.dirname(targetpath)<EOL>if upperdirs and not os.path.exists(upperdirs):<EOL><INDENT>os.makedirs(upperdirs)<EOL><DEDENT>if member.filename[-<NUM_LIT:1>] == '<STR_LIT:/>':<EOL><INDENT>if not os.path.isdir(targetpath):<EOL><INDENT>os.mkdir(targetpath)<EOL><DEDENT>return targetpath<EOL><DEDENT>source = self.open(member, pwd=pwd)<EOL>target = file(targetpath, "<STR_LIT:wb>")<EOL>shutil.copyfileobj(source, target)<EOL>source.close()<EOL>target.close()<EOL>return targetpath<EOL>
Extract the ZipInfo object 'member' to a physical
           file on the path targetpath.