def update_latest_symlink(outdir, latest_symlink):
  """Updates the 'latest' symlink to point to the given outdir."""
  if os.path.lexists(latest_symlink):
    try:
      os.remove(latest_symlink)
    except OSError as err:
      return err
  try:
    os.symlink(os.path.basename(auto_outdir), latest_symlink)
  except __HOLE__ as err:
    return err
  return None
dataset/ETHPy150Open m-lab/operator/tools/fetch.py/update_latest_symlink