parameters: (args_tuple)
docstring: For use with multiprocessing map. Returns filename on fail.
docstring_summary: For use with multiprocessing map. Returns filename on fail.
docstring_tokens: For use with multiprocessing map . Returns filename on fail .
function: def download_image(args_tuple):
      "For use with multiprocessing map. Returns filename on fail."
      try:
          url, filename = args_tuple
          if not os.path.exists(filename):
              urllib.urlretrieve(url, filename)
          with open(filename) as f:
              assert hashlib.sha1(f.read()).hexdigest() != MISSING_IMAGE_SHA1
          test_read_image = io.imread(filename)
          return True
      except KeyboardInterrupt:
          raise Exception()  # multiprocessing doesn't catch keyboard exceptions
      except:
          return False
function_tokens: def download_image ( args_tuple ) : try : url , filename = args_tuple if not os . path . exists ( filename ) : urllib . urlretrieve ( url , filename ) with open ( filename ) as f : assert hashlib . sha1 ( f . read ( ) ) . hexdigest ( ) != MISSING_IMAGE_SHA1 test_read_image = io . imread ( filename ) return True except KeyboardInterrupt : raise Exception ( ) # multiprocessing doesn't catch keyboard exceptions except : return False