code: def copy_from_scratch(file_mapping, dry_run=True):
          
          for key, value in file_mapping.items():
              if dry_run:
                  print ("copy %s %s" % (value, key))
              else:
                  try:
                      outdir = os.path.dirname(key)
                      os.makedirs(outdir)
                  except OSError:
                      pass
                  print ("copy %s %s" % (value, key))
                  copyfile(value, key)
          return file_mapping
docs: Copy output files from scratch area