code: def rename(self, src_basename, dest_basename, datadir="outdir"):
          
          directory = {
              "indir": self.indir,
              "outdir": self.outdir,
              "tmpdir": self.tmpdir,
          }[datadir]
  
          src = directory.path_in(src_basename)
          dest = directory.path_in(dest_basename)
  
          os.rename(src, dest)
docs: Rename a file located in datadir.
  
          src_basename and dest_basename are the basename of the source file
          and of the destination file, respectively.