docs: def run_tensorboard(run_id, tflog_id):
      """Launch TensorBoard for a given run ID and log ID of that run."""
      data = current_app.config["data"]
      # optimisticaly suppose the run exists...
      run = data.get_run_dao().get(run_id)
      base_dir = Path(run["experiment"]["base_dir"])
      log_dir = Path(run["info"]["tensorflow"]["logdirs"][tflog_id])
      # TODO ugly!!!
      if log_dir.is_absolute():
          path_to_log_dir = log_dir
      else:
          path_to_log_dir = base_dir.joinpath(log_dir)
  
      port = int(tensorboard.run_tensorboard(str(path_to_log_dir)))
      url_root = request.url_root
      url_parts = re.search("://([^:/]+)", url_root)
      redirect_to_address = url_parts.group(1)
      return redirect("http://%s:%d" % (redirect_to_address, port))