code: def move_outdir_orphan (outdir):
      
      entries = os.listdir(outdir)
      if len(entries) == 1:
          src = os.path.join(outdir, entries[0])
          dst = os.path.join(os.path.dirname(outdir), entries[0])
          if os.path.exists(dst) or os.path.islink(dst):
              return (False, "local file exists")
          shutil.move(src, dst)
          os.rmdir(outdir)
          return (True, entries[0])
      return (False, "multiple files in root")
docs: Move a single file or directory inside outdir a level up.
      Never overwrite files.
      Return (True, outfile) if successful, (False, reason) if not.